mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-09 20:22:43 +02:00
Update:Backups API endpoints, add get all backups route, update socket init event payload
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user