WIP - Persistent storage

This commit is contained in:
Andras Bacsai
2022-03-21 21:46:49 +01:00
parent f5e7a84fa6
commit a6d5316090
4 changed files with 8 additions and 3 deletions

View File

@@ -11,6 +11,9 @@
async function saveStorage() {
try {
storage.path = storage.path.startsWith('/') ? storage.path : `/${storage.path}`;
storage.path = storage.path.endsWith('/') ? storage.path.slice(0, -1) : storage.path;
storage.path.replace(/\/\//g, '/');
await post(`/applications/${id}/storage.json`, {
path: storage.path
});