TwoToc code
[YouAndWeb_TwoToc] / client / components / auth / user.service.js
diff --git a/client/components/auth/user.service.js b/client/components/auth/user.service.js
new file mode 100755 (executable)
index 0000000..60f52e5
--- /dev/null
@@ -0,0 +1,22 @@
+'use strict';
+
+angular.module('dashboardApp')
+  .factory('User', function ($resource) {
+    return $resource('/api/users/:id/:controller', {
+      id: '@_id'
+    },
+    {
+      changePassword: {
+        method: 'PUT',
+        params: {
+          controller:'password'
+        }
+      },
+      get: {
+        method: 'GET',
+        params: {
+          id:'me'
+        }
+      }
+    });
+  });