mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-06-08 19:52:50 +02:00
Update:Backups API endpoints, add get all backups route, update socket init event payload
This commit is contained in:
+5
-6
@@ -473,15 +473,14 @@ class Server {
|
||||
await this.db.updateEntity('user', user)
|
||||
|
||||
const initialPayload = {
|
||||
metadataPath: global.MetadataPath,
|
||||
configPath: global.ConfigPath,
|
||||
user: client.user.toJSONForBrowser(),
|
||||
librariesScanning: this.scanner.librariesScanning,
|
||||
backups: (this.backupManager.backups || []).map(b => b.toJSON())
|
||||
userId: client.user.id,
|
||||
username: client.user.username,
|
||||
librariesScanning: this.scanner.librariesScanning
|
||||
}
|
||||
if (user.type === 'root') {
|
||||
if (user.isAdminOrUp) {
|
||||
initialPayload.usersOnline = this.getUsersOnline()
|
||||
}
|
||||
|
||||
client.socket.emit('init', initialPayload)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user