Handle mass actions for file deletion

This commit is contained in:
Dane Everitt 2020-07-11 15:37:59 -07:00
parent 82bc9e617b
commit 93cab68cc3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 147 additions and 31 deletions

View file

@ -0,0 +1,9 @@
import http from '@/api/http';
export default (uuid: string, directory: string, files: string[]): Promise<void> => {
return new Promise((resolve, reject) => {
http.post(`/api/client/servers/${uuid}/files/delete`, { root: directory, files })
.then(() => resolve())
.catch(reject);
});
};