Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. app.factory('sessionService', ['$http', function($http) {
  2. function getEventSessions(id) {
  3. return $http.get("/api/event/" + id + "/sessions");
  4. }
  5. function getSession(id) {
  6. return $http.get("/api/session/" + id);
  7. }
  8. function updateSession(session) {
  9. console.log(session);
  10. return $http.post("/api/session/update", session);
  11. }
  12. function createSession(session) {
  13. console.log(session);
  14. return $http.post("/api/session/create", session);
  15. }
  16. function createUpdateSession(session) {
  17. console.log(session);
  18. return $http.post("/api/session/createupdate", session);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement