Fix typo, userdb.del() wants an id

This commit is contained in:
Johannes Zellner
2016-04-03 01:57:25 +02:00
parent fd0326efb1
commit 31bd5cdee3

View File

@@ -213,7 +213,7 @@ function removeUser(user, callback) {
assert.strictEqual(typeof user, 'object');
assert.strictEqual(typeof callback, 'function');
userdb.del(user, function (error) {
userdb.del(user.id, function (error) {
if (error && error.reason === DatabaseError.NOT_FOUND) return callback(new UserError(UserError.NOT_FOUND));
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));