Skip to content

Commit

Permalink
refactor: mongodb _id validator pipe 추가 #20, #50
Browse files Browse the repository at this point in the history
  • Loading branch information
NaayoungKwon committed Nov 16, 2022
1 parent 82c3f10 commit 44465cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/apps/api/src/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class UserController {
// }

@Post('following/:id')
async addFollowing(@Param('id') id: string) {
async addFollowing(@Param('id', ObjectIdValidationPipe) id: string) {
try {
const myId = '63734e98384f478a32c3a1cc';
// TODO: Request Header에서 access token으로 현재 사용자 알아내기
Expand All @@ -34,7 +34,7 @@ export class UserController {
}

@Delete('following/:id')
async unFollowing(@Param('id') id: string) {
async unFollowing(@Param('id', ObjectIdValidationPipe) id: string) {
try {
const myId = '63734e98384f478a32c3a1cc';
// TODO: Request Header에서 access token으로 현재 사용자 알아내기
Expand Down

0 comments on commit 44465cb

Please sign in to comment.