aboutsummaryrefslogtreecommitdiff
path: root/public/js/services
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/services')
-rw-r--r--public/js/services/todoService.js28
1 files changed, 13 insertions, 15 deletions
diff --git a/public/js/services/todoService.js b/public/js/services/todoService.js
index 649c61f..a51db95 100644
--- a/public/js/services/todoService.js
+++ b/public/js/services/todoService.js
@@ -1,16 +1,14 @@
angular.module('todoService', [])
-
- // use the api
- .factory('Todos', ['$http', function($http) {
- return {
- get : function() {
- return $http.get('/api/todos');
- },
- create : function(data) {
- return $http.post('/api/todos', data);
- },
- delete : function(id) {
- return $http.delete('/api/todos/' + id);
- }
- }
- }]); \ No newline at end of file
+ .factory('Todos', ['$http', function($http) {
+ return {
+ get : function() {
+ return $http.get('/api/todos');
+ },
+ create : function(data) {
+ return $http.post('/api/todos', data);
+ },
+ delete : function(id) {
+ return $http.delete('/api/todos/' + id);
+ }
+ }
+ }]);