PteroTheme/resources/scripts/api/server/files/deleteFiles.ts

10 lines
328 B
TypeScript
Raw Normal View History

2019-08-04 23:46:58 +01:00
import http from '@/api/http';
2020-07-11 23:37:59 +01:00
export default (uuid: string, directory: string, files: string[]): Promise<void> => {
2019-08-04 23:46:58 +01:00
return new Promise((resolve, reject) => {
2020-07-11 23:37:59 +01:00
http.post(`/api/client/servers/${uuid}/files/delete`, { root: directory, files })
2019-08-04 23:46:58 +01:00
.then(() => resolve())
.catch(reject);
});
};