feat: add product stats
This commit is contained in:
parent
a018f69f91
commit
865497bf29
1 changed files with 5 additions and 0 deletions
|
|
@ -56,6 +56,11 @@ function imageLocation(id: string) {
|
|||
@Route("api/v1/product")
|
||||
@Tags("Product")
|
||||
export class ProductController extends Controller {
|
||||
@Get("stats")
|
||||
async getProductStats(@Query() productTypeId?: string) {
|
||||
return await prisma.product.count({ where: { productTypeId } });
|
||||
}
|
||||
|
||||
@Get()
|
||||
@Security("keycloak")
|
||||
async getProduct(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue