From 4ce167cdafe775647c48b08826eb251a3d1058c2 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Tue, 26 Aug 2025 22:50:29 +0800 Subject: [PATCH] fix build error --- prisma/schema.prisma | 2 +- src/app/api/credits/topup/route.ts | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 0f36872..8354620 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -168,7 +168,7 @@ model Credit { id String @id @default(cuid()) userId String amount Float // 交易金额(正数为充值,负数为消费) - balance Float @default(0) // 执行该交易后的余额 + balance Float @default(5) // 执行该交易后的余额 type String // "system_gift", "subscription_monthly", "user_purchase", "consumption" category String? // 消费类别: "simulation", "api_call", "export" 等 note String? // 备注说明 diff --git a/src/app/api/credits/topup/route.ts b/src/app/api/credits/topup/route.ts index 5103427..d47fbfc 100644 --- a/src/app/api/credits/topup/route.ts +++ b/src/app/api/credits/topup/route.ts @@ -41,10 +41,7 @@ export async function POST(request: Request) { user.id, amount, 'user_purchase', - 'development', - null, - null, - `Development top-up: $${amount}` + `Development top-up: $${amount}`, ) return NextResponse.json({