Skip to content

Commit 3a3364e

Browse files
committed
fix(api): correct query to verify API key by using the correct column for hashedApiKey
1 parent d2cce02 commit 3a3364e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/api/src/db/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ export async function verifyApiKey(
551551
const [apiKeyRecord] = await db
552552
.select()
553553
.from(apiKeys)
554-
.where(eq(apiKeys.id, hashedApiKey));
554+
.where(eq(apiKeys.key, hashedApiKey));
555555

556556
if (!apiKeyRecord || !apiKeyRecord.organizationId) {
557557
return null; // Key not found or not associated with an organization

0 commit comments

Comments
 (0)