API: getUserByToken returs user id now

This commit is contained in:
Sagi Dayan 2015-06-25 00:04:04 +03:00
parent b3e5ce4716
commit e3fe428900
3 changed files with 4 additions and 3 deletions

View file

@ -27,6 +27,7 @@ class User(db.Model):
'campusName': self.campusName, 'campusName': self.campusName,
'campuses_id_list': self.campuses_id_list, 'campuses_id_list': self.campuses_id_list,
'courses_id_list': self.courses_id_list, 'courses_id_list': self.courses_id_list,
'projects_id_list': self.projects_id_list 'projects_id_list': self.projects_id_list,
'id' : self.key().id()
} }
return json.dumps(data) return json.dumps(data)

View file

@ -1,5 +1,5 @@
angular.module('SeHub') angular.module('SeHub')
.controller('settingsController', ['$scope', '$rootScope', 'dataService', 'apiService', '$cookies', '$location', .controller('profileController', ['$scope', '$rootScope', 'dataService', 'apiService', '$cookies', '$location',
function($scope, $rootScope, dataService, apiService, $cookies, $location) { function($scope, $rootScope, dataService, apiService, $cookies, $location) {
var token = $cookies['com.sehub.www']; var token = $cookies['com.sehub.www'];
@ -7,7 +7,7 @@ angular.module('SeHub')
$scope.loadingData = true; $scope.loadingData = true;
$scope.isInRegisterMode = false; $scope.isInRegisterMode = false;
$scope.title = "Settings" $scope.title = "Profile"
apiService.getUserByToken(token).success(function(data) { apiService.getUserByToken(token).success(function(data) {
if (data.message == 'No User Found') { if (data.message == 'No User Found') {