Refactor
This commit is contained in:
@@ -46,7 +46,7 @@ export default async (ctx: Koa.BaseContext) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const profile = await UserProfiles.findOne({ userId: user.id }).then(ensure);
|
||||
const profile = await UserProfiles.findOne(user.id).then(ensure);
|
||||
|
||||
// Compare password
|
||||
const same = await bcrypt.compare(password, profile.password!);
|
||||
|
Reference in New Issue
Block a user