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