File tree 1 file changed +2
-3
lines changed
velog-backend/src/router/auth
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import UserMeta from '../../database/models/UserMeta';
20
20
21
21
const s3 = new AWS . S3 ( { region : 'ap-northeast-2' , signatureVersion : 'v4' } ) ;
22
22
23
-
24
23
export const sendAuthEmail = async ( ctx : Context ) : Promise < * > => {
25
24
type BodySchema = {
26
25
email : string ,
@@ -44,7 +43,8 @@ export const sendAuthEmail = async (ctx: Context): Promise<*> => {
44
43
}
45
44
46
45
try {
47
- const { email } : BodySchema = ( ctx . request . body : any ) ;
46
+ const { email : rawEmail } : BodySchema = ( ctx . request . body : any ) ;
47
+ const email = rawEmail . toLowerCase ( ) ;
48
48
49
49
// TODO: check email existancy
50
50
const user = await User . findUser ( 'email' , email ) ;
@@ -280,7 +280,6 @@ export const createLocalAccount = async (ctx: Context): Promise<*> => {
280
280
token,
281
281
} ;
282
282
283
-
284
283
setTimeout ( ( ) => {
285
284
UserMeta . build ( {
286
285
fk_user_id : user . id ,
You can’t perform that action at this time.
0 commit comments