Replace all @Controller('acadenice/...') decorators with 'v1/...' on 16 NestJS controllers. Update all client services, hooks, tests, extension-clipper, and doc comments to match. DB table names (acadenice_*) and folder structure untouched.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
627 B
TypeScript
22 lines
627 B
TypeScript
import api from "@/lib/api-client";
|
|
import {
|
|
AcadeniceApiKey,
|
|
CreateAcadeniceApiKeyRequest,
|
|
CreateAcadeniceApiKeyResponse,
|
|
} from "../types/api-key.types";
|
|
|
|
export async function listAcadeniceApiKeys(): Promise<AcadeniceApiKey[]> {
|
|
const resp = await api.get("/v1/api-keys");
|
|
return resp.data;
|
|
}
|
|
|
|
export async function createAcadeniceApiKey(
|
|
data: CreateAcadeniceApiKeyRequest,
|
|
): Promise<CreateAcadeniceApiKeyResponse> {
|
|
const resp = await api.post("/v1/api-keys", data);
|
|
return resp.data;
|
|
}
|
|
|
|
export async function revokeAcadeniceApiKey(id: string): Promise<void> {
|
|
await api.delete(`/v1/api-keys/${id}`);
|
|
}
|