| Total Complexity | 1 |
| Total Lines | 10 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { Inject } from '@nestjs/common'; |
||
| 5 | |||
| 6 | @QueryHandler(GetPendingLeaveRequestsCountQuery) |
||
| 7 | export class GetPendingLeaveRequestsCountQueryHandler { |
||
| 8 | constructor( |
||
| 9 | @Inject('ILeaveRequestRepository') |
||
| 10 | private readonly leaveRequestRepository: ILeaveRequestRepository |
||
| 11 | ) {} |
||
| 12 | |||
| 13 | public async execute(_: GetPendingLeaveRequestsCountQuery): Promise<number> { |
||
| 14 | return await this.leaveRequestRepository.getPendingCount(); |
||
| 15 | } |
||
| 17 |