feat: openapi page

This commit is contained in:
archer
2023-04-07 22:48:21 +08:00
parent 43f8d6008f
commit 22cc9c85be
24 changed files with 190 additions and 94 deletions

16
src/api/openapi.ts Normal file
View File

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