Skip to content

Commit

Permalink
⚡️ :: (#178) Get /user/anwer/count/user:id 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
flower1465 committed Jul 11, 2022
1 parent a99c264 commit 10959dc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/presentation/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
) {}
Expand Down Expand Up @@ -113,4 +117,9 @@ export class UserController {
userQuestionCnt(@Param('userId', ParseIntPipe) userId: number): Promise<number> {
return this.userQuestionCountUsecase.execute(userId);
}

@Get('/answer/count/:userId')
userAnswerCnt(@Param('userId', ParseIntPipe) userId: number): Promise<number> {
return this.userAnswerCountUsecase.execute(userId);
}
}

0 comments on commit 10959dc

Please sign in to comment.