Skip to content

Commit 9745513

Browse files
committed
매칭 기능 수정
1 parent 511b1b6 commit 9745513

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/matching/matching.controller.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ export class MatchingController {
5454
) {}
5555

5656
@Post()
57-
//@UseGuards(AuthGuard)
57+
@UseGuards(AuthGuard)
5858
@CreateMatchingSwagger('매칭 생성 API')
5959
async createMatching(
6060
@Req() req: Request,
6161
@Body() body: CreateMatchingReqeust,
6262
): Promise<BaseResponse<CreateMatchingResponse>> {
63-
if (10 !== body.requesterId)
63+
if (req.user.id !== body.requesterId)
6464
throw UnauthorizedException('권한이 없습니다.');
6565

6666
if (!(await this.userService.getUserById(body.targetId)))
@@ -137,12 +137,12 @@ export class MatchingController {
137137
}
138138

139139
@Get()
140-
//@UseGuards(AuthGuard)
140+
@UseGuards(AuthGuard)
141141
@GetMatchingsSwagger('매칭 리스트 조회 API')
142142
async getMatchings(
143143
@Req() req: Request,
144144
): Promise<BaseResponse<GetMatchingsResponse>> {
145-
const response = await this.matchingService.getMatchings(14);
145+
const response = await this.matchingService.getMatchings(req.user.id);
146146
return new BaseResponse(true, 'SUCCESS', response);
147147
}
148148
}

0 commit comments

Comments
 (0)