[FEATURE] Mutable Servers & Edit UI (#8)
Co-authored-by: Dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.dev/elysium/minecluster/pulls/8
This commit is contained in:
parent
23efaafe1d
commit
3d73f69678
19 changed files with 291 additions and 35 deletions
|
@ -39,6 +39,14 @@ export const useDeleteServer = (serverId) =>
|
|||
postJsonApi("/server/delete", { id: serverId }, "server-instances", "DELETE");
|
||||
export const useCreateServer = (spec) =>
|
||||
postJsonApi("/server/create", spec, "server-list");
|
||||
export const useModifyServer = (spec) =>
|
||||
postJsonApi("/server/modify", spec, "server-list");
|
||||
|
||||
export const useGetServer = (serverId) =>
|
||||
useQuery({
|
||||
queryKey: [`server-blueprint-${serverId}`],
|
||||
queryFn: fetchApiPost("/server/blueprint", { id: serverId }),
|
||||
});
|
||||
|
||||
export const getServerFiles = async (serverId, path) =>
|
||||
fetchApiCore("/files/list", { id: serverId, path }, "POST", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue