Support modifying startup variables for servers
This commit is contained in:
parent
1b69d82daa
commit
91cdbd6c2e
11 changed files with 226 additions and 6 deletions
9
resources/scripts/api/server/updateStartupVariable.ts
Normal file
9
resources/scripts/api/server/updateStartupVariable.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import http from '@/api/http';
|
||||
import { ServerEggVariable } from '@/api/server/types';
|
||||
import { rawDataToServerEggVariable } from '@/api/transformers';
|
||||
|
||||
export default async (uuid: string, key: string, value: string): Promise<ServerEggVariable> => {
|
||||
const { data } = await http.put(`/api/client/servers/${uuid}/startup/variable`, { key, value });
|
||||
|
||||
return rawDataToServerEggVariable(data);
|
||||
};
|
Reference in a new issue