We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bb85f2 commit 4f09d07Copy full SHA for 4f09d07
apps/sim/app/api/v1/admin/credits/route.ts
@@ -51,7 +51,7 @@ export const POST = withAdminAuth(async (request) => {
51
return badRequestResponse('Either userId or email is required')
52
}
53
54
- if (typeof amount !== 'number' || amount <= 0) {
+ if (typeof amount !== 'number' || !Number.isFinite(amount) || amount <= 0) {
55
return badRequestResponse('amount must be a positive number')
56
57
0 commit comments