From 5c5d91ca79e5fb674aaba0d10c4ed028ba398306 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Tue, 9 Jun 2015 20:16:29 +0300 Subject: [PATCH] Fix To JS Error --- templates/js/app.js | 2 +- templates/js/controllers/mainController.js | 5 +++-- templates/js/services/apiService.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/js/app.js b/templates/js/app.js index e0d58d8..46b8d12 100644 --- a/templates/js/app.js +++ b/templates/js/app.js @@ -1,4 +1,4 @@ -var DEBUG = false; +var DEBUG = true; var welcome = angular.module('welcome', ['ngMaterial', 'seHub.services', 'ngRoute' , 'ngCookies']); diff --git a/templates/js/controllers/mainController.js b/templates/js/controllers/mainController.js index 6e184b4..c27cf90 100644 --- a/templates/js/controllers/mainController.js +++ b/templates/js/controllers/mainController.js @@ -6,11 +6,12 @@ angular.module('SeHub') $scope.loadingData = true; apiService.getUserByToken(token).success(function(data){ + console.log(data); if(data.message == 'No User Found') console.error("No User Found!"); - $scope.user = data._entity; - $rootScope.user = data._entity; + $scope.user = data; + $rootScope.user = data; if($scope.user.isFirstLogin) $location.path('/register') }) diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index ef6ebd4..dafc060 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -1,4 +1,4 @@ -var DEBUG = false; +var DEBUG = true; var service = angular.module('seHub.services', []);