misc_pterodactyl-panel/resources/scripts/api/server/updateStartupVariable.ts
2020-08-22 18:13:59 -07:00

9 lines
400 B
TypeScript

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