2020-08-23 01:13:59 +00:00
|
|
|
import http from '@/api/http';
|
|
|
|
import { ServerEggVariable } from '@/api/server/types';
|
|
|
|
import { rawDataToServerEggVariable } from '@/api/transformers';
|
|
|
|
|
2022-06-26 19:13:52 +00:00
|
|
|
export default async (uuid: string, key: string, value: string): Promise<[ServerEggVariable, string]> => {
|
2020-08-23 01:13:59 +00:00
|
|
|
const { data } = await http.put(`/api/client/servers/${uuid}/startup/variable`, { key, value });
|
|
|
|
|
2022-06-26 19:13:52 +00:00
|
|
|
return [rawDataToServerEggVariable(data), data.meta.startup_command];
|
2020-08-23 01:13:59 +00:00
|
|
|
};
|