feat: update status on used
This commit is contained in:
parent
4d63ede738
commit
b423f3b356
1 changed files with 7 additions and 0 deletions
|
|
@ -117,6 +117,13 @@ export class ProductType extends Controller {
|
|||
{ isolationLevel: Prisma.TransactionIsolationLevel.Serializable },
|
||||
);
|
||||
|
||||
if (productGroup.status === "CREATED") {
|
||||
await prisma.productGroup.update({
|
||||
where: { id: body.productGroupId },
|
||||
data: { status: Status.ACTIVE },
|
||||
});
|
||||
}
|
||||
|
||||
this.setStatus(HttpStatus.CREATED);
|
||||
|
||||
return record;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue