From 4c60c81bace91ce7277e52e3dc9fb2c75940eed0 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:42:03 +0700 Subject: [PATCH] fix: wrong table ref --- src/controllers/product/type-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/product/type-controller.ts b/src/controllers/product/type-controller.ts index 9f02628..2395b96 100644 --- a/src/controllers/product/type-controller.ts +++ b/src/controllers/product/type-controller.ts @@ -118,7 +118,7 @@ export class ProductType extends Controller { throw new HttpError(HttpStatus.NOT_FOUND, "Product type cannot be found.", "data_not_found"); } - const record = await prisma.work.update({ + const record = await prisma.productType.update({ data: { ...body, updateBy: req.user.name }, where: { id: typeId }, });