fix api key

This commit is contained in:
David 2026-05-12 01:23:47 +02:00
parent 71d131f4cb
commit 9acabb6859

View File

@ -28,28 +28,28 @@ export interface CreateApiKeyRequest {
/** /**
* List all API keys for the current organization * List all API keys for the current organization
* GET /api-keys * GET /api/v1/api-keys
* Requires: Gold or Platinum plan * Requires: Gold or Platinum plan
*/ */
export async function listApiKeys(): Promise<ApiKeyDto[]> { export async function listApiKeys(): Promise<ApiKeyDto[]> {
return get<ApiKeyDto[]>('/api-keys'); return get<ApiKeyDto[]>('/api/v1/api-keys');
} }
/** /**
* Create a new API key * Create a new API key
* POST /api-keys * POST /api/v1/api-keys
* Requires: Gold or Platinum plan * Requires: Gold or Platinum plan
* Returns the full key shown only once * Returns the full key shown only once
*/ */
export async function createApiKey(data: CreateApiKeyRequest): Promise<CreateApiKeyResultDto> { export async function createApiKey(data: CreateApiKeyRequest): Promise<CreateApiKeyResultDto> {
return post<CreateApiKeyResultDto>('/api-keys', data); return post<CreateApiKeyResultDto>('/api/v1/api-keys', data);
} }
/** /**
* Revoke an API key (immediate and irreversible) * Revoke an API key (immediate and irreversible)
* DELETE /api-keys/:id * DELETE /api/v1/api-keys/:id
* Requires: Gold or Platinum plan * Requires: Gold or Platinum plan
*/ */
export async function revokeApiKey(id: string): Promise<void> { export async function revokeApiKey(id: string): Promise<void> {
return del<void>(`/api-keys/${id}`); return del<void>(`/api/v1/api-keys/${id}`);
} }