refactor(auth): simplify API key export in authentication module

This commit is contained in:
Mauricio Siu
2025-03-01 21:49:56 -06:00
parent 5c38a8265f
commit d7c94174b9
2 changed files with 2 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ const { handler, api } = betterAuth({
export const auth = { export const auth = {
handler, handler,
api, createApiKey: api.createApiKey,
}; };
export const validateRequest = async (request: IncomingMessage) => { export const validateRequest = async (request: IncomingMessage) => {

View File

@@ -267,7 +267,7 @@ export const createApiKey = async (
refillInterval?: number; refillInterval?: number;
}, },
) => { ) => {
const apiKey = await auth.api.createApiKey({ const apiKey = await auth.createApiKey({
body: { body: {
name: input.name, name: input.name,
expiresIn: input.expiresIn, expiresIn: input.expiresIn,