mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 05:19:51 +00:00
4.7.1-alpha (#1120)
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
34
projects/app/src/web/support/laf/api.ts
Normal file
34
projects/app/src/web/support/laf/api.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { GET, POST, PUT } from '@/web/common/api/lafRequest';
|
||||
|
||||
export const postLafPat2Token = (pat: string) => POST<string>(`/v1/auth/pat2token`, { pat });
|
||||
|
||||
export const getLafApplications = (token: string) =>
|
||||
GET<
|
||||
{
|
||||
appid: string;
|
||||
name: string;
|
||||
state: 'Running' | 'Failed' | 'Stopped';
|
||||
}[]
|
||||
>(
|
||||
`/v1/applications`,
|
||||
{},
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
export const getLafAppDetail = (appid: string) =>
|
||||
GET<{
|
||||
appid: string;
|
||||
name: string;
|
||||
openapi_token: string;
|
||||
domain: {
|
||||
_id: string;
|
||||
appid: string;
|
||||
domain: string;
|
||||
state: string;
|
||||
phase: string;
|
||||
};
|
||||
}>(`/v1/applications/${appid}`);
|
Reference in New Issue
Block a user