mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-04 02:22:09 +01:00
Update backups config page to use backupPathEnvSet returned from endpoint, remove from ServerConfig
This commit is contained in:
@@ -30,7 +30,7 @@ class BackupManager {
|
||||
}
|
||||
|
||||
get backupPathEnvSet() {
|
||||
return global.ServerSettings.backupPathEnvSet
|
||||
return !!process.env.BACKUP_PATH
|
||||
}
|
||||
|
||||
get backupSchedule() {
|
||||
|
||||
@@ -26,7 +26,6 @@ class ServerSettings {
|
||||
this.rateLimitLoginWindow = 10 * 60 * 1000 // 10 Minutes
|
||||
|
||||
// Backups
|
||||
this.backupPathEnvSet = false
|
||||
this.backupPath = Path.join(global.MetadataPath, 'backups')
|
||||
this.backupSchedule = false // If false then auto-backups are disabled
|
||||
this.backupsToKeep = 2
|
||||
@@ -189,8 +188,6 @@ class ServerSettings {
|
||||
Logger.info(`[ServerSettings] Using backup path from environment variable ${process.env.BACKUP_PATH}`)
|
||||
this.backupPath = process.env.BACKUP_PATH
|
||||
}
|
||||
|
||||
this.backupPathEnvSet = !!process.env.BACKUP_PATH || false
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
@@ -209,7 +206,6 @@ class ServerSettings {
|
||||
rateLimitLoginRequests: this.rateLimitLoginRequests,
|
||||
rateLimitLoginWindow: this.rateLimitLoginWindow,
|
||||
backupPath: this.backupPath,
|
||||
backupPathEnvSet: this.backupPathEnvSet,
|
||||
backupSchedule: this.backupSchedule,
|
||||
backupsToKeep: this.backupsToKeep,
|
||||
maxBackupSize: this.maxBackupSize,
|
||||
|
||||
Reference in New Issue
Block a user