mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
15 lines
586 B
TypeScript
15 lines
586 B
TypeScript
import type { IRestApiContext } from '@/Interface';
|
|
import { makeRestApiRequest } from '@/utils/apiUtils';
|
|
|
|
export async function getApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
|
|
return makeRestApiRequest(context, 'GET', '/me/api-key');
|
|
}
|
|
|
|
export async function createApiKey(context: IRestApiContext): Promise<{ apiKey: string | null }> {
|
|
return makeRestApiRequest(context, 'POST', '/me/api-key');
|
|
}
|
|
|
|
export async function deleteApiKey(context: IRestApiContext): Promise<{ success: boolean }> {
|
|
return makeRestApiRequest(context, 'DELETE', '/me/api-key');
|
|
}
|