diff --git a/templates/js/controllers/myClassesController.js b/templates/js/controllers/myClassesController.js index 5bc0572..6fc4029 100644 --- a/templates/js/controllers/myClassesController.js +++ b/templates/js/controllers/myClassesController.js @@ -121,7 +121,7 @@ angular.module('SeHub') var displayCourses = function() { - apiService.getCoursesByCampus(campusId).success(function(data) // Shows all classes from this campus + apiService.getAllCoursesByCampus(token, campusId).success(function(data) // Shows all classes from this campus { $scope.courses = data; console.log("success " + $scope.courses); diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index 770c9f8..d94388f 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -43,8 +43,8 @@ service.factory('apiService', ['$http', function($http) { }; return $http(req); }, - getCoursesByCampus: function(campusId){ - var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCoursesByCampus/" + campusId; + getAllCoursesByCampus: function(token, campusId){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getAllCoursesByCampus/" + token + '/' + campusId; req = { method : "GET", url : url diff --git a/templates/views/myClasses.html b/templates/views/myClasses.html index e431fc0..7764104 100644 --- a/templates/views/myClasses.html +++ b/templates/views/myClasses.html @@ -83,11 +83,11 @@ -
+