mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
feat: edit server config online (#112)
* feat: edit server config online * fix schema * fix error
This commit is contained in:
@@ -17,3 +17,11 @@ export const forceUpdateServer = async (id: number[]): Promise<ModelForceUpdateR
|
||||
export const getServers = async (): Promise<ModelServer[]> => {
|
||||
return fetcher<ModelServer[]>(FetcherMethod.GET, "/api/v1/server", null)
|
||||
}
|
||||
|
||||
export const getServerConfig = async (id: number): Promise<string> => {
|
||||
return fetcher<string>(FetcherMethod.GET, `/api/v1/server/${id}/config`, null)
|
||||
}
|
||||
|
||||
export const setServerConfig = async (id: number, data: string): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.POST, `/api/v1/server/${id}/config`, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user