From 52fbd16e08fe59d2d0a7a588dfa565a8ff2d2c95 Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 8 Jan 2026 19:24:20 -0500 Subject: wip: zen wip: zen --- packages/console/app/src/routes/stripe/webhook.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/console/app/src/routes/stripe') diff --git a/packages/console/app/src/routes/stripe/webhook.ts b/packages/console/app/src/routes/stripe/webhook.ts index c468d2d0c..6f1637641 100644 --- a/packages/console/app/src/routes/stripe/webhook.ts +++ b/packages/console/app/src/routes/stripe/webhook.ts @@ -1,8 +1,7 @@ import { Billing } from "@opencode-ai/console-core/billing.js" import type { APIEvent } from "@solidjs/start/server" import { and, Database, eq, sql } from "@opencode-ai/console-core/drizzle/index.js" -import { BillingTable, PaymentTable } from "@opencode-ai/console-core/schema/billing.sql.js" -import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js" +import { BillingTable, PaymentTable, SubscriptionTable } from "@opencode-ai/console-core/schema/billing.sql.js" import { Identifier } from "@opencode-ai/console-core/identifier.js" import { centsToMicroCents } from "@opencode-ai/console-core/util/price.js" import { Actor } from "@opencode-ai/console-core/actor.js" @@ -380,7 +379,7 @@ export async function POST(input: APIEvent) { await Database.transaction(async (tx) => { await tx.update(BillingTable).set({ subscriptionID: null }).where(eq(BillingTable.workspaceID, workspaceID)) - await tx.update(UserTable).set({ timeSubscribed: null }).where(eq(UserTable.workspaceID, workspaceID)) + await tx.delete(SubscriptionTable).where(eq(SubscriptionTable.workspaceID, workspaceID)) }) } })() -- cgit v1.2.3