backups: add per site enabledForUpdates flag

previously, we had a singleton 'main' flag to indicate a site can
be used for updates. with this new approach, we can get rid of the
'primary' concept. each site can be used for updates or not.
This commit is contained in:
Girish Ramakrishnan
2025-09-22 17:59:26 +02:00
parent 69d92ba0a8
commit 5157789774
11 changed files with 88 additions and 88 deletions

View File

@@ -171,9 +171,9 @@ async function initializeExpressSync() {
router.post('/api/v1/backup_sites/:id/configure/limits', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setLimits);
router.post('/api/v1/backup_sites/:id/configure/schedule', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setSchedule);
router.post('/api/v1/backup_sites/:id/configure/retention', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setRetention);
router.post('/api/v1/backup_sites/:id/configure/primary', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setPrimary);
router.post('/api/v1/backup_sites/:id/configure/encryption', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setEncryption);
router.post('/api/v1/backup_sites/:id/configure/contents', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setContents);
router.post('/api/v1/backup_sites/:id/configure/enable_for_updates', json, token, authorizeOwner, routes.backupSites.load, routes.backupSites.setEnabledForUpdates);
// app archive routes
router.get ('/api/v1/archives', token, authorizeAdmin, routes.archives.list);