ui(server): fix used backup count (#3526)

* ui(server): fix used backup count

* ui(server): refactor backup count code
This commit is contained in:
Matthew Penner 2021-08-04 21:34:00 -06:00 committed by GitHub
parent 7e91a33a67
commit 10b357b71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 32 deletions

View file

@ -81,7 +81,7 @@ export default () => {
clearFlashes('backups:create');
createServerBackup(uuid, values)
.then(backup => {
mutate(data => ({ ...data, items: data.items.concat(backup) }), false);
mutate(data => ({ ...data, items: data.items.concat(backup), backupCount: data.backupCount + 1 }), false);
setVisible(false);
})
.catch(error => {