Adds update backup functionality

This commit is contained in:
Alicia Sykes
2021-05-24 17:39:05 +01:00
parent 44b2594dfa
commit bdb6e310e8
2 changed files with 29 additions and 7 deletions

View File

@@ -29,6 +29,15 @@ export const backup = (data, password) => {
});
};
/* Updates and existing backup */
export const update = (data, password, backupId) => {
return axios.put(ENDPOINT, {
backupId,
userData: encryptData(data, password),
subHash: makeSubHash(password),
});
};
/* Restores the backup */
export const restore = (backupId, password) => {
// return axios.get(ENDPOINT, {