Resolve #365
This commit is contained in:
parent
2bd03ca725
commit
2615368b1e
8 changed files with 23 additions and 36 deletions
|
|
@ -58,13 +58,13 @@ export default async (ctx: Koa.BaseContext) => {
|
|||
}
|
||||
|
||||
// Validate username
|
||||
if (!Users.validateUsername(username)) {
|
||||
if (!Users.validateLocalUsername.ok(username)) {
|
||||
ctx.status = 400;
|
||||
return;
|
||||
}
|
||||
|
||||
// Validate password
|
||||
if (!Users.validatePassword(password)) {
|
||||
if (!Users.validatePassword.ok(password)) {
|
||||
ctx.status = 400;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue