From 3abca8fd4b08f5d122c2352fcee64755a028228a Mon Sep 17 00:00:00 2001 From: Frank Date: Thu, 11 Sep 2025 17:21:49 -0400 Subject: wip: zen --- cloud/app/src/util/zen.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloud/app/src') diff --git a/cloud/app/src/util/zen.ts b/cloud/app/src/util/zen.ts index 47cec9f6f..d02a9c614 100644 --- a/cloud/app/src/util/zen.ts +++ b/cloud/app/src/util/zen.ts @@ -1,6 +1,6 @@ import type { APIEvent } from "@solidjs/start/server" import path from "node:path" -import { Database, eq, sql } from "@opencode/cloud-core/drizzle/index.js" +import { and, Database, eq, isNull, sql } from "@opencode/cloud-core/drizzle/index.js" import { KeyTable } from "@opencode/cloud-core/schema/key.sql.js" import { BillingTable, UsageTable } from "@opencode/cloud-core/schema/billing.sql.js" import { centsToMicroCents } from "@opencode/cloud-core/util/price.js" @@ -390,7 +390,7 @@ export async function handler( workspaceID: KeyTable.workspaceID, }) .from(KeyTable) - .where(eq(KeyTable.key, apiKey)) + .where(and(eq(KeyTable.key, apiKey), isNull(KeyTable.timeDeleted))) .then((rows) => rows[0]), ) -- cgit v1.2.3