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

15 lines
381 B
TypeScript
Raw Permalink Normal View History

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