fix: change casing for apiKey schema
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user