misc_pterodactyl-panel/resources/scripts/api/server/files/saveFileContents.ts

11 lines
302 B
TypeScript
Raw Normal View History

2019-10-26 20:16:27 +00:00
import http from '@/api/http';
export default async (uuid: string, file: string, content: string): Promise<void> => {
await http.post(`/api/client/servers/${uuid}/files/write`, content, {
params: { file },
headers: {
'Content-Type': 'text/plain',
},
2019-10-26 20:16:27 +00:00
});
};