mirror of
https://github.com/wassname/talk.git
synced 2026-07-18 12:40:13 +08:00
An N was missing...
This commit is contained in:
@@ -123,7 +123,7 @@ router.put('/username', authorization.needed(), (req, res, next) => {
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.code === 11000) {
|
||||
next(errors.ErrUsernameTake);
|
||||
next(errors.ErrUsernameTaken);
|
||||
} else {
|
||||
next(error);
|
||||
}
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ module.exports = class UsersService {
|
||||
if (err) {
|
||||
if (err.code === 11000) {
|
||||
if (err.message.match('Username')) {
|
||||
return reject(errors.ErrUsernameTake);
|
||||
return reject(errors.ErrUsernameTaken);
|
||||
}
|
||||
return reject(errors.ErrEmailTaken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user