mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Add username back to device list stats.
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
module.exports = function UserServiceFactory($http, $rootScope, socket, $timeout) {
|
||||
var userService = {}
|
||||
|
||||
userService.user = (function () {
|
||||
userService.currentUser = (function () {
|
||||
var userPromise = $http.get('/api/v1/user')
|
||||
.then(function(response) {
|
||||
if (!response.data.success) {
|
||||
throw new Error('Unable to get user data')
|
||||
}
|
||||
return response.data.user
|
||||
})
|
||||
return function () {
|
||||
return userPromise
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user