Semaphore/public/js/services/user.js
2014-08-24 18:36:34 +01:00

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();
});
}
});
});