From aa7d865352417fe53eb1e7f7b795ef7e61d569dc Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 11 Jun 2024 09:31:10 +0700 Subject: [PATCH] fix: wrong endpoints --- src/controllers/product/group-controller.ts | 2 +- src/controllers/product/type-controller.ts | 2 +- src/controllers/service/service-controller.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/product/group-controller.ts b/src/controllers/product/group-controller.ts index e5b3ef1..cea4f52 100644 --- a/src/controllers/product/group-controller.ts +++ b/src/controllers/product/group-controller.ts @@ -37,7 +37,7 @@ type ProductGroupUpdate = { @Tags("Product Group") @Security("keycloak") export class ProductGroup extends Controller { - @Get() + @Get("stats") async getProductGroupStats() { return await prisma.productGroup.count(); } diff --git a/src/controllers/product/type-controller.ts b/src/controllers/product/type-controller.ts index 87611d7..e1c5bb8 100644 --- a/src/controllers/product/type-controller.ts +++ b/src/controllers/product/type-controller.ts @@ -37,7 +37,7 @@ type ProductTypeUpdate = { @Tags("Product Type") @Security("keycloak") export class ProductType extends Controller { - @Get() + @Get("stats") async getProductTypeStats() { return await prisma.productType.count(); } diff --git a/src/controllers/service/service-controller.ts b/src/controllers/service/service-controller.ts index a2a5ca8..d8a9583 100644 --- a/src/controllers/service/service-controller.ts +++ b/src/controllers/service/service-controller.ts @@ -46,7 +46,7 @@ function imageLocation(id: string) { @Tags("Service") @Security("keycloak") export class ServiceController extends Controller { - @Get() + @Get("stats") async getServiceStats() { return await prisma.service.count(); }