Fix the user invitation to use userId

This commit is contained in:
Johannes Zellner
2016-04-03 01:05:36 +02:00
parent 8cbf83058f
commit 1b7406784e
2 changed files with 3 additions and 3 deletions

View File

@@ -471,8 +471,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
};
};
Client.prototype.sendInvite = function (username, callback) {
$http.post(client.apiOrigin + '/api/v1/users/' + username + '/invite', {}).success(function (data, status) {
Client.prototype.sendInvite = function (user, callback) {
$http.post(client.apiOrigin + '/api/v1/users/' + user.id + '/invite', {}).success(function (data, status) {
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.resetToken);
}).error(defaultErrorHandler(callback));