aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/src/lib/files.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/web/src/lib/files.js b/src/web/src/lib/files.js
index 9c147d61..9284fb1b 100644
--- a/src/web/src/lib/files.js
+++ b/src/web/src/lib/files.js
@@ -5,4 +5,18 @@ export const list = async ({ root, subdirectory = '' }) => {
const response = (await api.get(`/files/${root}/directories/${subdirectory}`)).data;
return response;
+};
+
+export const deleteDirectory = async ({ root, path }) => {
+ path = btoa(path);
+ const response = (await api.delete(`/files/${root}/directories/${path}`));
+
+ return response;
+};
+
+export const deleteFile = async ({ root, path }) => {
+ path = btoa(path);
+ const response = (await api.delete(`/files/${root}/files/${path}`));
+
+ return response;
}; \ No newline at end of file