feat: also handle when input 0 installments
This commit is contained in:
parent
9bc6ba2d49
commit
8690b4d82a
1 changed files with 12 additions and 0 deletions
|
|
@ -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(
|
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) => {
|
const record = await prisma.$transaction(async (tx) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue