From 1611026688836e8bd67dbf1afbe1fe69acd62805 Mon Sep 17 00:00:00 2001 From: Hyang-Dan Date: Tue, 2 Dec 2025 22:31:36 +0900 Subject: [PATCH] =?UTF-8?q?issue=20#39=20-=20=EB=A1=9C=EA=B7=B8=EC=9D=B8?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EC=98=A4=EB=A5=98=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/account/account.controller.ts | 1 + src/modules/account/account.repo.ts | 5 +---- src/modules/account/account.service.ts | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/modules/account/account.controller.ts b/src/modules/account/account.controller.ts index 1805670..bedb347 100644 --- a/src/modules/account/account.controller.ts +++ b/src/modules/account/account.controller.ts @@ -66,6 +66,7 @@ export class AccountController { @Public() @Post('login') async login(@Body() body: DTO.LoginRequest): Promise { + console.log('a'); const result = await this.accountService.login(body); return result; } diff --git a/src/modules/account/account.repo.ts b/src/modules/account/account.repo.ts index 0bcaaa1..58e5fea 100644 --- a/src/modules/account/account.repo.ts +++ b/src/modules/account/account.repo.ts @@ -42,16 +42,13 @@ export class AccountRepo { type: 'email' | 'accountId' , id: string ) { - const condition = type === 'email' - ? eq(schema.account.email, id) - : eq(schema.account.accountId, id); return this .db .select() .from(schema.account) .where( and( - condition, + eq(schema.account[type], id), eq(schema.account.isDeleted, false), eq(schema.account.status, 'active') ) diff --git a/src/modules/account/account.service.ts b/src/modules/account/account.service.ts index 51d3fe8..190bf6b 100644 --- a/src/modules/account/account.service.ts +++ b/src/modules/account/account.service.ts @@ -78,9 +78,6 @@ export class AccountService { const queryResult = await this.accountRepo.login(type, id); const typeValue = type === 'email' ? '이메일' : '아이디'; - - console.log(queryResult); - if (!queryResult || (queryResult.length < 1)) { return { success: false, @@ -88,7 +85,6 @@ export class AccountService { }; } - const hashedPassword = queryResult[0].password; const isPasswordMatch = Converter.comparePassword(password, hashedPassword); if (!isPasswordMatch) {