feat: also handle when input 0 installments

This commit is contained in:
Methapon2001 2024-12-25 15:43:21 +07:00
parent 9bc6ba2d49
commit 8690b4d82a

View file

@ -337,6 +337,12 @@ export class ServiceController extends Controller {
);
}
}
} else {
throw new HttpError(
HttpStatus.BAD_REQUEST,
"Installments validate failed.",
"installmentsValidateFailed",
);
}
const record = await prisma.$transaction(
@ -460,6 +466,12 @@ export class ServiceController extends Controller {
);
}
}
} else {
throw new HttpError(
HttpStatus.BAD_REQUEST,
"Installments validate failed.",
"installmentsValidateFailed",
);
}
const record = await prisma.$transaction(async (tx) => {