feat: count employee

This commit is contained in:
Methapon2001 2024-06-11 09:48:11 +07:00
parent e82f3f37b2
commit c079f43e8d

View file

@ -200,6 +200,13 @@ type EmployeeUpdate = {
@Tags("Employee")
@Security("keycloak")
export class EmployeeController extends Controller {
@Get("stats")
async getEmployeeStats(@Query() customerBranchId?: string) {
return await prisma.employee.count({
where: { customerBranchId },
});
}
@Get()
async list(
@Query() zipCode?: string,