harbor/static/resources/js/services/user/services.update-user.js

24 lines
513 B
JavaScript
Raw Normal View History

2016-06-21 07:28:21 +02:00
(function() {
'use strict';
angular
.module('harbor.services.user')
.factory('UpdateUserService', UpdateUserService);
UpdateUserService.$inject = ['$http'];
function UpdateUserService($http) {
return updateUser;
function updateUser(userId, user) {
return $http
.put('/api/users/' + userId, {
'username': user.username,
'email': user.email,
'realname': user.realname,
'comment': user.comment
});
}
}
})();