chore: add format

This commit is contained in:
Methapon2001 2024-06-18 09:19:59 +07:00
parent b423f3b356
commit 212fec4f14

View file

@ -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) {