feat: openapi crd

This commit is contained in:
archer
2023-04-07 23:15:30 +08:00
parent 22cc9c85be
commit f6c4b4c96d
5 changed files with 131 additions and 17 deletions

View File

@@ -3,14 +3,14 @@ import { UserOpenApiKey } from '@/types/openapi';
/**
* crete a api key
*/
export const createAApiKey = () => POST('/openapi/postKey');
export const createAOpenApiKey = () => POST<string>('/openapi/postKey');
/**
* get api keys
*/
export const getApiKeys = () => GET<UserOpenApiKey[]>('/openapi/getKeys');
export const getOpenApiKeys = () => GET<UserOpenApiKey[]>('/openapi/getKeys');
/**
* delete api by id
*/
export const delApiById = (id: string) => DELETE(`/openapi/delKet?id=${id}`);
export const delOpenApiById = (id: string) => DELETE(`/openapi/delKet?id=${id}`);