Commit 9745513 1 parent 511b1b6 commit 9745513 Copy full SHA for 9745513
File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,13 @@ export class MatchingController {
54
54
) { }
55
55
56
56
@Post ( )
57
- // @UseGuards (AuthGuard)
57
+ @UseGuards ( AuthGuard )
58
58
@CreateMatchingSwagger ( '매칭 생성 API' )
59
59
async createMatching (
60
60
@Req ( ) req : Request ,
61
61
@Body ( ) body : CreateMatchingReqeust ,
62
62
) : Promise < BaseResponse < CreateMatchingResponse > > {
63
- if ( 10 !== body . requesterId )
63
+ if ( req . user . id !== body . requesterId )
64
64
throw UnauthorizedException ( '권한이 없습니다.' ) ;
65
65
66
66
if ( ! ( await this . userService . getUserById ( body . targetId ) ) )
@@ -137,12 +137,12 @@ export class MatchingController {
137
137
}
138
138
139
139
@Get ( )
140
- // @UseGuards (AuthGuard)
140
+ @UseGuards ( AuthGuard )
141
141
@GetMatchingsSwagger ( '매칭 리스트 조회 API' )
142
142
async getMatchings (
143
143
@Req ( ) req : Request ,
144
144
) : Promise < BaseResponse < GetMatchingsResponse > > {
145
- const response = await this . matchingService . getMatchings ( 14 ) ;
145
+ const response = await this . matchingService . getMatchings ( req . user . id ) ;
146
146
return new BaseResponse ( true , 'SUCCESS' , response ) ;
147
147
}
148
148
}
You can’t perform that action at this time.
0 commit comments