Skip to content

Commit

Permalink
Merge pull request #97 from modern-agile-team/feature/auth
Browse files Browse the repository at this point in the history
Modify(NicoDora/auth): 내정보 가져오기 API 반환값에 id 추가
  • Loading branch information
NicoDora authored Nov 7, 2023
2 parents 086d579 + fc3a8a8 commit a36c504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/auth/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ export class AuthController {
@ApiNewAccessToken()
@UseGuards(JwtRefreshTokenGuard)
@Get('new-access-token')
async newAccessToken(
@GetUserId() userId: number,
@Res() res,
) {
async newAccessToken(@GetUserId() userId: number, @Res() res) {
const newAccessToken = await this.tokenService.createAccessToken(userId);
return res.json({ accessToken: newAccessToken });
}
Expand Down Expand Up @@ -145,6 +142,6 @@ export class AuthController {
@UseGuards(JwtAccessTokenGuard)
@Get('status')
async status() {
return { success : true };
return { success: true };
}
}
3 changes: 2 additions & 1 deletion src/users/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ export class UserService {
) {}

async getMyInfo(userId: number) {
const { name, email, gender, admin, provider } =
const { id, name, email, gender, admin, provider } =
await this.userRepository.getUserInfo(userId);
const userImage = (await this.userImageRepository.checkUserImage(userId))
.imageUrl;
return {
id,
name,
email,
gender,
Expand Down

0 comments on commit a36c504

Please sign in to comment.