chore: add format
This commit is contained in:
parent
b423f3b356
commit
212fec4f14
1 changed files with 15 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue