misc_pterodactyl-panel/resources/scripts/api/server/files/renameFiles.ts
2020-07-11 16:20:42 -07:00

14 lines
379 B
TypeScript

import http from '@/api/http';
interface Data {
to: string;
from: string;
}
export default (uuid: string, directory: string, files: Data[]): Promise<void> => {
return new Promise((resolve, reject) => {
http.put(`/api/client/servers/${uuid}/files/rename`, { root: directory, files })
.then(() => resolve())
.catch(reject);
});
};