Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.factory('sessionService', ['$http', function($http) {
- function getEventSessions(id) {
- return $http.get("/api/event/" + id + "/sessions");
- }
- function getSession(id) {
- return $http.get("/api/session/" + id);
- }
- function updateSession(session) {
- console.log(session);
- return $http.post("/api/session/update", session);
- }
- function createSession(session) {
- console.log(session);
- return $http.post("/api/session/create", session);
- }
- function createUpdateSession(session) {
- console.log(session);
- return $http.post("/api/session/createupdate", session);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement