Basic app backup import is working

This commit is contained in:
Johannes Zellner
2025-04-29 16:58:36 +02:00
parent 1d61d4dad4
commit 34583c834d
3 changed files with 224 additions and 13 deletions
+11
View File
@@ -430,6 +430,17 @@ function create() {
if (result.status !== 201) return [result];
return [null, result.body];
},
async import(id, remotePath, backupFormat, backupConfig) {
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/apps/${id}/import`, { remotePath, backupFormat, backupConfig }, { access_token: accessToken });
} catch (e) {
return [e];
}
if (result.status !== 202) return [result];
return [null, result.body];
},
};
}