mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
implement remaining features of the server page (#9)
* implement remaining features of the server page * fix fm init * ?
This commit is contained in:
+5
-1
@@ -1,4 +1,4 @@
|
||||
import { ModelServer, ModelServerForm } from "@/types"
|
||||
import { ModelServer, ModelServerForm, ModelForceUpdateResponse } from "@/types"
|
||||
import { fetcher, FetcherMethod } from "./api"
|
||||
|
||||
export const updateServer = async (id: number, data: ModelServerForm): Promise<void> => {
|
||||
@@ -9,6 +9,10 @@ export const deleteServer = async (id: number[]): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.POST, '/api/v1/batch-delete/server', id);
|
||||
}
|
||||
|
||||
export const forceUpdateServer = async (id: number[]): Promise<ModelForceUpdateResponse> => {
|
||||
return fetcher<ModelForceUpdateResponse>(FetcherMethod.POST, '/api/v1/force-update/server', id);
|
||||
}
|
||||
|
||||
export const getServers = async (): Promise<ModelServer[]> => {
|
||||
return fetcher<ModelServer[]>(FetcherMethod.GET, '/api/v1/server', null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user