mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-23 14:25:17 +02:00
Add user service and reorganize services. Messy commit but it's a start.
This commit is contained in:
16
res/app/scripts/services/userService.js
Normal file
16
res/app/scripts/services/userService.js
Normal file
@@ -0,0 +1,16 @@
|
||||
define(['./module'], function(mod) {
|
||||
function UserServiceFactory($http) {
|
||||
var userService = {
|
||||
info: {}
|
||||
}
|
||||
|
||||
$http.get('/api/v1/user')
|
||||
.success(function(data) {
|
||||
userService.info = data.user
|
||||
})
|
||||
|
||||
return userService
|
||||
}
|
||||
|
||||
mod.factory('userService', ['$http', UserServiceFactory])
|
||||
})
|
||||
Reference in New Issue
Block a user