mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 08:10:50 +01:00
15 lines
267 B
JavaScript
15 lines
267 B
JavaScript
define([
|
|
'app'
|
|
], function(app) {
|
|
app.service('user', function($http, $rootScope) {
|
|
var self = this;
|
|
|
|
self.getUser = function(cb) {
|
|
$http.get('/profile').success(function(data) {
|
|
$rootScope.user = self.user = data.user;
|
|
|
|
cb();
|
|
});
|
|
}
|
|
});
|
|
}); |