mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-26 07:45:16 +02:00
Attempting to make it easier to work with a single device. Still not bound to the new controlService.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
define(['./module'], function(mod) {
|
||||
function UserServiceFactory($http) {
|
||||
var userService = {
|
||||
info: {}
|
||||
}
|
||||
|
||||
$http.get('/api/v1/user')
|
||||
.success(function(data) {
|
||||
userService.info = data.user
|
||||
})
|
||||
userService.user = (function() {
|
||||
var userPromise = $http.get('/api/v1/user')
|
||||
return function() {
|
||||
return userPromise
|
||||
}
|
||||
})()
|
||||
|
||||
return userService
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user