harbor/static/ng/resources/js/services/user/services.sign-up.js

26 lines
532 B
JavaScript
Raw Normal View History

(function() {
'use strict';
angular
.module('harbor.services.user')
.factory('SignUpService', SignUpService);
SignUpService.$inject = ['$http', '$log'];
function SignUpService($http, $log) {
return SignUp;
function SignUp(user) {
2016-05-06 14:37:44 +02:00
return $http
.post('/api/users', {
2016-05-06 14:37:44 +02:00
'username': user.username,
'email': user.email,
'password': user.password,
'realname': user.realname,
'comment': user.comment
});
}
}
})();