Skip to content

Commit

Permalink
add equip reserve count API
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHorn07 committed Dec 3, 2023
1 parent 02db2a7 commit 2996ad9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/popo/reservation/equip/reserve.equip.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ export class ReserveEquipController {
}
return `Sync Done: ${equipmentList.length} Equipments`;
}

@Get('count')
count() {
return this.reserveEquipService.count();
}

@Get(':uuid')
getOne(@Param('uuid') uuid) {
Expand Down
4 changes: 4 additions & 0 deletions src/popo/reservation/equip/reserve.equip.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export class ReserveEquipService {
find(findOptions?: object) {
return this.reserveEquipRepo.find(findOptions);
}

count(whereOption?: object) {
return this.reserveEquipRepo.count({ where: whereOption });
}

findOneByUuid(uuid: string) {
return this.reserveEquipRepo.findOneBy({ uuid: uuid});
Expand Down

0 comments on commit 2996ad9

Please sign in to comment.