mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-22 19:59:37 +00:00
Update:Backups API endpoints, add get all backups route, update socket init event payload
This commit is contained in:
parent
6af5ac2be1
commit
64a8a046c1
7 changed files with 67 additions and 50 deletions
|
|
@ -106,13 +106,20 @@ class BackupManager {
|
|||
this.backups.push(backup)
|
||||
}
|
||||
|
||||
return res.json(this.backups.map(b => b.toJSON()))
|
||||
res.json({
|
||||
backups: this.backups.map(b => b.toJSON())
|
||||
})
|
||||
}
|
||||
|
||||
async requestCreateBackup(res) {
|
||||
var backupSuccess = await this.runBackup()
|
||||
if (backupSuccess) res.json(this.backups.map(b => b.toJSON()))
|
||||
else res.sendStatus(500)
|
||||
if (backupSuccess) {
|
||||
res.json({
|
||||
backups: this.backups.map(b => b.toJSON())
|
||||
})
|
||||
} else {
|
||||
res.sendStatus(500)
|
||||
}
|
||||
}
|
||||
|
||||
async requestApplyBackup(backup) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue