fix: change casing for apiKey schema

This commit is contained in:
Henry
2025-06-01 23:07:21 +01:00
parent 90b928bd51
commit ee5cbd1e7f
4 changed files with 7 additions and 9 deletions

View File

@@ -2,7 +2,7 @@ import { desc, eq } from "drizzle-orm";
import { v4 as uuidv4 } from "uuid";
import type { dbClient } from "@kan/db/client";
import { apiKey, users } from "@kan/db/schema";
import { apikey, users } from "@kan/db/schema";
export const getById = async (db: dbClient, userId: string) => {
return await db.query.users.findFirst({
@@ -20,7 +20,7 @@ export const getById = async (db: dbClient, userId: string) => {
prefix: true,
key: true,
},
orderBy: desc(apiKey.createdAt),
orderBy: desc(apikey.createdAt),
limit: 1,
},
},