diff --git a/src/controllers/product/group-controller.ts b/src/controllers/product/group-controller.ts index fb6ace0..ae3667a 100644 --- a/src/controllers/product/group-controller.ts +++ b/src/controllers/product/group-controller.ts @@ -99,11 +99,11 @@ export class ProductGroup extends Controller { @Body() body: ProductGroupUpdate, @Path() groupId: string, ) { - if (!(await prisma.work.findUnique({ where: { id: groupId } }))) { + if (!(await prisma.productGroup.findUnique({ where: { id: groupId } }))) { throw new HttpError(HttpStatus.NOT_FOUND, "Product group cannot be found.", "data_not_found"); } - const record = await prisma.work.update({ + const record = await prisma.productGroup.update({ data: { ...body, updateBy: req.user.name }, where: { id: groupId }, });