File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,6 @@ export class RestaurantController {
3535 } ) ;
3636 }
3737
38- return RestaurantResponse . fromEntity ( resp ) ;
38+ return res . status ( HttpStatus . OK ) . json ( RestaurantResponse . fromEntity ( resp ) ) ;
3939 }
4040}
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class RestaurantRepository {
6060 }
6161
6262 async findById ( id : string ) : Promise < RestaurantEntity | null > {
63- const restaurant = await this . prisma . restaurant . findUnique ( {
63+ const restaurant = await this . prisma . restaurant . findFirst ( {
6464 where : { id } ,
6565 } ) ;
6666 return restaurant ? this . mapToRestaurantEntity ( restaurant ) : null ;
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ export class UserController {
174174 @User ( ) user : any ,
175175 @Res ( ) res : Response ,
176176 ) {
177- const result = await this . followUserUseCase . execute ( user . id , userId ) ;
177+ const result = await this . followUserUseCase . execute ( userId , user . id ) ;
178178 return res . status ( HttpStatus . CREATED ) . json ( result ) ; // TODO: into FollowerResponse
179179 }
180180
@@ -306,14 +306,17 @@ export class UserController {
306306 @ApiResponse ( {
307307 status : 200 ,
308308 description : 'userId에 따라 FollowingStatus 반환' ,
309- type : CheckFollowingStatusDto
309+ type : CheckFollowingStatusDto ,
310310 } )
311311 async checkFollowingStatus (
312312 @User ( 'id' ) userId : string ,
313313 @Param ( 'userId' ) targetUserId : string ,
314314 @Res ( ) res : Response ,
315- ) {
316- const result = await this . checkFollowingStatusUsecase . execute ( userId , targetUserId )
317- return res . status ( HttpStatus . OK ) . json ( result )
315+ ) {
316+ const result = await this . checkFollowingStatusUsecase . execute (
317+ userId ,
318+ targetUserId ,
319+ ) ;
320+ return res . status ( HttpStatus . OK ) . json ( result ) ;
318321 }
319322}
You can’t perform that action at this time.
0 commit comments