Skip to content

Commit cf38d62

Browse files
committed
refactor(client:auth): use named function for user resource
1 parent f222cfb commit cf38d62

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/templates/client/components/auth(auth)/user.service(js).js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use strict';
22

3-
angular.module('<%= scriptAppName %>.auth')
4-
.factory('User', function ($resource) {
3+
(function() {
4+
5+
function UserResource($resource) {
56
return $resource('/api/users/:id/:controller', {
67
id: '@_id'
78
},
@@ -19,4 +20,9 @@ angular.module('<%= scriptAppName %>.auth')
1920
}
2021
}
2122
});
22-
});
23+
}
24+
25+
angular.module('<%= scriptAppName %>.auth')
26+
.factory('User', UserResource);
27+
28+
})();

0 commit comments

Comments
 (0)