mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-29 15:00:09 +00:00
Allow to reset the borg backup host location before initial backup was started
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
@@ -121,6 +121,10 @@ class ConfigurationController
|
||||
$this->configurationManager->SetCollaboraDictionaries($collaboraDictionaries);
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['delete_borg_backup_host_location'])) {
|
||||
$this->configurationManager->DeleteBorgBackupHostLocation();
|
||||
}
|
||||
|
||||
return $response->withStatus(201)->withHeader('Location', '/');
|
||||
} catch (InvalidSettingConfigurationException $ex) {
|
||||
$response->getBody()->write($ex->getMessage());
|
||||
|
||||
@@ -413,6 +413,12 @@ class ConfigurationManager
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
public function DeleteBorgBackupHostLocation() : void {
|
||||
$config = $this->GetConfig();
|
||||
$config['borg_backup_host_location'] = '';
|
||||
$this->WriteConfig($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws InvalidSettingConfigurationException
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user