Created
December 8, 2015 23:11
-
-
Save mekhami/9d9d8d1cea8a3cb18e39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .factory('rsvpDataService', ['$http', function($http) { | |
| var service = {}; | |
| service.getAllRsvp = function() { | |
| return $http.get('/api/rsvps/'); | |
| }; | |
| service.getRsvp = function(code) { | |
| return $http.get('/api/rsvps/code/'+code.toUpperCase()); | |
| }; | |
| service.getRsvpById = function(id) { | |
| return $http.get('/api/rsvps/id/'+id); | |
| }; | |
| service.updateRsvp = function(formData) { | |
| return $http.post('/api/rsvps/code/'+formData.code.toUpperCase(), formData); | |
| }; | |
| service.createRsvp = function(formData) { | |
| return $http.post('/api/rsvps/create', formData); | |
| }; | |
| service.deleteRsvp = function(id) { | |
| return $http.delete('/api/rsvps/id/'+id); | |
| }; | |
| return service; | |
| }]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment