fix: status order not update when enable / disable

This commit is contained in:
Methapon2001 2025-02-18 13:46:39 +07:00
parent 3af6701ff0
commit 0ac81ce743

View file

@ -162,7 +162,7 @@ export class InstitutionController extends Controller {
) {
return await prisma.institution.update({
where: { id: institutionId },
data: body,
data: { ...body, statusOrder: +(body.status === "INACTIVE") },
});
}