Skip to content

Commit 5ea5847

Browse files
committed
modify: type 일관성과 철저한 내제화 데이터 응답
1 parent b4ad410 commit 5ea5847

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/controllers/__test__/user.controller.test.ts

Whitespace-only changes.

src/controllers/user.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Token10 = string & { __lengthBrand: 10 };
1212
const THREE_WEEKS_IN_MS = 21 * 24 * 60 * 60 * 1000;
1313

1414
export class UserController {
15-
constructor(private userService: UserService) {}
15+
constructor(private userService: UserService) { }
1616

1717
/**
1818
* 환경 및 쿠키 삭제 여부에 따라 쿠키 옵션을 생성합니다.
@@ -55,7 +55,7 @@ export class UserController {
5555
const response = new LoginResponseDto(
5656
true,
5757
'로그인에 성공하였습니다.',
58-
{ id: user.id, username: velogUser.username, profile: velogUser.profile },
58+
{ id: user.id, username: user.username || '', profile: { thumbnail: user.thumbnail || '' } },
5959
null,
6060
);
6161

src/services/user.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class UserService {
132132
}
133133

134134
async updateUserTokens(userData: UserWithTokenDto) {
135-
return await this.userRepo.updateTokens(userData.uuid, userData.email || '', userData.username, userData.thumbnail || '', userData.accessToken, userData.refreshToken);
135+
return await this.userRepo.updateTokens(userData.uuid, userData.email, userData.username, userData.thumbnail, userData.accessToken, userData.refreshToken);
136136
}
137137

138138
async createUserQRToken(userId: number, ip: string, userAgent: string): Promise<string> {

0 commit comments

Comments
 (0)