fix: count by group
This commit is contained in:
parent
03707b7bd8
commit
3fb15f8344
1 changed files with 2 additions and 2 deletions
|
|
@ -81,8 +81,8 @@ function globalAllow(roles?: string[]) {
|
||||||
export class ServiceController extends Controller {
|
export class ServiceController extends Controller {
|
||||||
@Get("stats")
|
@Get("stats")
|
||||||
@Security("keycloak")
|
@Security("keycloak")
|
||||||
async getServiceStats() {
|
async getServiceStats(@Query() productGroupId?: string) {
|
||||||
return await prisma.service.count();
|
return await prisma.service.count({ where: { productGroupId } });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get()
|
@Get()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue