From e3fe428900ae0a934f7a595693e58debe05fc55e Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Thu, 25 Jun 2015 00:04:04 +0300 Subject: [PATCH] API: getUserByToken returs user id now --- models/User.py | 3 ++- .../{settingsController.js => profileController.js} | 4 ++-- templates/views/{settings.html => profile.html} | 0 3 files changed, 4 insertions(+), 3 deletions(-) rename templates/js/controllers/{settingsController.js => profileController.js} (94%) rename templates/views/{settings.html => profile.html} (100%) diff --git a/models/User.py b/models/User.py index d3bb545..bb60c2b 100644 --- a/models/User.py +++ b/models/User.py @@ -27,6 +27,7 @@ class User(db.Model): 'campusName': self.campusName, 'campuses_id_list': self.campuses_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) diff --git a/templates/js/controllers/settingsController.js b/templates/js/controllers/profileController.js similarity index 94% rename from templates/js/controllers/settingsController.js rename to templates/js/controllers/profileController.js index c1a7724..6f8fd18 100644 --- a/templates/js/controllers/settingsController.js +++ b/templates/js/controllers/profileController.js @@ -1,5 +1,5 @@ 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) { var token = $cookies['com.sehub.www']; @@ -7,7 +7,7 @@ angular.module('SeHub') $scope.loadingData = true; $scope.isInRegisterMode = false; - $scope.title = "Settings" + $scope.title = "Profile" apiService.getUserByToken(token).success(function(data) { if (data.message == 'No User Found') { diff --git a/templates/views/settings.html b/templates/views/profile.html similarity index 100% rename from templates/views/settings.html rename to templates/views/profile.html