Support modifying startup variables for servers

This commit is contained in:
Dane Everitt 2020-08-22 18:13:59 -07:00
parent 1b69d82daa
commit 91cdbd6c2e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 226 additions and 6 deletions

View 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);
};