From 212fec4f14c644bea163a455cfa969805625f08c Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:19:59 +0700 Subject: [PATCH] chore: add format --- src/controllers/product/type-controller.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/controllers/product/type-controller.ts b/src/controllers/product/type-controller.ts index d6fa9c1..24d5d4f 100644 --- a/src/controllers/product/type-controller.ts +++ b/src/controllers/product/type-controller.ts @@ -73,7 +73,11 @@ export class ProductType extends Controller { }); if (!record) - throw new HttpError(HttpStatus.NOT_FOUND, "Product type cannot be found.", "productTypeNotFound"); + throw new HttpError( + HttpStatus.NOT_FOUND, + "Product type cannot be found.", + "productTypeNotFound", + ); return record; } @@ -147,7 +151,11 @@ export class ProductType extends Controller { } if (!(await prisma.productType.findUnique({ where: { id: typeId } }))) { - throw new HttpError(HttpStatus.NOT_FOUND, "Product type cannot be found.", "productTypeNotFound"); + throw new HttpError( + HttpStatus.NOT_FOUND, + "Product type cannot be found.", + "productTypeNotFound", + ); } const record = await prisma.productType.update({ @@ -163,7 +171,11 @@ export class ProductType extends Controller { const record = await prisma.productType.findFirst({ where: { id: typeId } }); if (!record) { - throw new HttpError(HttpStatus.NOT_FOUND, "Product type cannot be found.", "productTypeNotFound"); + throw new HttpError( + HttpStatus.NOT_FOUND, + "Product type cannot be found.", + "productTypeNotFound", + ); } if (record.status !== Status.CREATED) {