mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 02:34:52 +00:00
feat: openapi page
This commit is contained in:
16
src/api/openapi.ts
Normal file
16
src/api/openapi.ts
Normal 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}`);
|
Reference in New Issue
Block a user