From 10959dc0e27f291f3b65dde93efcddca8418a464 Mon Sep 17 00:00:00 2001 From: Seung jun Date: Mon, 11 Jul 2022 11:40:43 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20::=20(#178)=20Get=20/user/?= =?UTF-8?q?anwer/count/user:id=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/presentation/user/user.controller.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/presentation/user/user.controller.ts b/src/presentation/user/user.controller.ts index 01650b1..2ea4a8a 100644 --- a/src/presentation/user/user.controller.ts +++ b/src/presentation/user/user.controller.ts @@ -20,6 +20,7 @@ import { IUserRequest } from 'src/domain/interfaces/request.interface'; import { User } from 'src/domain/model/user'; import { Video } from 'src/domain/model/video'; import { UpdateExpoTokenUsecase } from 'src/usecase/user/upsert-expo-token'; +import { UserAnswerCountUsecase } from 'src/usecase/user/user-answer-count'; import { UserAnswerListUsecase } from 'src/usecase/user/user-answer-video'; import { UserBlockUsecase } from 'src/usecase/user/user-block'; import { UserCashExchangeUsecase } from 'src/usecase/user/user-cash-exchange'; @@ -48,6 +49,9 @@ export class UserController { private readonly userDeleteUsecase: UserDeleteUsecase, @Inject(UserQuestionCountUsecase) private readonly userQuestionCountUsecase: UserQuestionCountUsecase, + @Inject(UserAnswerCountUsecase) + private readonly userAnswerCountUsecase: UserAnswerCountUsecase, + @Inject(REQUEST) private readonly request: IUserRequest, ) {} @@ -113,4 +117,9 @@ export class UserController { userQuestionCnt(@Param('userId', ParseIntPipe) userId: number): Promise { return this.userQuestionCountUsecase.execute(userId); } + + @Get('/answer/count/:userId') + userAnswerCnt(@Param('userId', ParseIntPipe) userId: number): Promise { + return this.userAnswerCountUsecase.execute(userId); + } }