From 43de4f9b803a774b7ceec2103e9274c2287d870b Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Fri, 26 Jun 2015 15:06:59 +0300 Subject: [PATCH] apiServices: Added GetUserById & get GetCampusByUserId --- templates/js/services/apiService.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/templates/js/services/apiService.js b/templates/js/services/apiService.js index 7948658..9105c66 100644 --- a/templates/js/services/apiService.js +++ b/templates/js/services/apiService.js @@ -123,8 +123,26 @@ service.factory('apiService', ['$http', function($http) { method : "GET", url : url + }; + return $http(req); + }, + getUserById: function(token, id){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/users/getUserById/" + token + "/" + id; + req = { + method : "GET", + url : url + }; + return $http(req); + }, + getCampusesByUserId: function(token, id){ + var url = (DEBUG ? "http://localhost:8080" : "http://se-hub.appspot.com") + "/api/campuses/getCampusesByUserID/" + token + "/" + id; + req = { + method : "GET", + url : url + }; return $http(req); } + }; }]); \ No newline at end of file