issue #39
All checks were successful
Test CI / build (push) Successful in 1m17s

- 로그인 기능 오류 보완
This commit is contained in:
2025-12-02 22:31:36 +09:00
parent e4048843e9
commit 1611026688
3 changed files with 2 additions and 8 deletions

View File

@@ -66,6 +66,7 @@ export class AccountController {
@Public()
@Post('login')
async login(@Body() body: DTO.LoginRequest): Promise<DTO.LoginResponse> {
console.log('a');
const result = await this.accountService.login(body);
return result;
}

View File

@@ -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')
)

View File

@@ -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) {