mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(auth): simplify API key export in authentication module
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user