mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-09 02:28:59 +03:00
parent
bba1a95f9c
commit
797e3c5b35
@ -58,7 +58,6 @@ export class AuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (credential.password) {
|
if (credential.password) {
|
||||||
validators.assertValidPassword(credential.password);
|
|
||||||
const user = await this.auth.signIn(
|
const user = await this.auth.signIn(
|
||||||
credential.email,
|
credential.email,
|
||||||
credential.password
|
credential.password
|
||||||
|
@ -132,7 +132,7 @@ export class AuthResolver {
|
|||||||
@Args('email') email: string,
|
@Args('email') email: string,
|
||||||
@Args('password') password: string
|
@Args('password') password: string
|
||||||
) {
|
) {
|
||||||
validators.assertValidCredential({ email, password });
|
validators.assertValidEmail(email);
|
||||||
const user = await this.auth.signIn(email, password);
|
const user = await this.auth.signIn(email, password);
|
||||||
await this.auth.setCookie(ctx.req, ctx.res, user);
|
await this.auth.setCookie(ctx.req, ctx.res, user);
|
||||||
ctx.req.user = user;
|
ctx.req.user = user;
|
||||||
|
Loading…
Reference in New Issue
Block a user