AngularJS Service getCoursesByUserID

This commit is contained in:
Sagi Dayan 2015-06-29 14:21:17 +03:00
parent 5b87b0a4d0
commit edac533f2b

View file

@ -168,6 +168,15 @@ service.factory('apiService', ['$http', function($http) {
data: payLoad data: payLoad
}; };
return $http(req); return $http(req);
},
getCoursesByUserID: function(token, userId){
var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/courses/getCoursesByUser/" + token + "/" + userId;
req = {
method : "GET",
url : url,
data: payLoad
};
return $http(req);
} }
}; };
}]); }]);