We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff37607 commit 5e93071Copy full SHA for 5e93071
web/src/app/api/stripe/buy-credits/route.ts
@@ -1,4 +1,4 @@
1
-import { getUserCostPerCredit, processAndGrantCredit } from '@codebuff/billing'
+import { processAndGrantCredit } from '@codebuff/billing'
2
import db from '@codebuff/common/db'
3
import * as schema from '@codebuff/common/db/schema'
4
import { convertCreditsToUsdCents } from '@codebuff/common/util/currency'
@@ -64,7 +64,7 @@ export async function POST(req: NextRequest) {
64
)
65
}
66
67
- const centsPerCredit = await getUserCostPerCredit(userId)
+ const centsPerCredit = 1
68
const amountInCents = convertCreditsToUsdCents(credits, centsPerCredit)
69
70
if (amountInCents <= 0) {
0 commit comments