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

15 lines
379 B
TypeScript
Raw Normal View History

2019-08-03 05:22:01 +00:00
import http from '@/api/http';
interface Data {
2020-07-11 23:20:42 +00:00
to: string;
from: string;
2019-08-03 05:22:01 +00:00
}
export default (uuid: string, directory: string, files: Data[]): Promise<void> => {
2019-08-03 05:22:01 +00:00
return new Promise((resolve, reject) => {
2020-07-11 23:20:42 +00:00
http.put(`/api/client/servers/${uuid}/files/rename`, { root: directory, files })
2019-08-03 05:22:01 +00:00
.then(() => resolve())
.catch(reject);
});
};