Merge pull request #7723 from nextcloud/enh/7664/backup-list

DockerController: refactor `StartBackupContainerList` to show the starting state
This commit is contained in:
Simon L.
2026-03-12 18:24:09 +01:00
committed by GitHub
2 changed files with 12 additions and 5 deletions

View File

@@ -115,8 +115,15 @@ readonly class DockerController {
}
public function StartBackupContainerList(Request $request, Response $response, array $args) : Response {
$this->listBackup();
return $response->withStatus(201)->withHeader('Location', '.');
// Get streaming response start and closure
$nonbufResp = $this->startStreamingResponse($response);
$addToStreamingResponseBody = $this->getAddToStreamingResponseBody($nonbufResp);
$this->listBackup($addToStreamingResponseBody);
// End streaming response
$this->finalizeStreamingResponse($nonbufResp);
return $nonbufResp;
}
public function checkBackup(?\Closure $addToStreamingResponseBody = null) : void {
@@ -126,11 +133,11 @@ readonly class DockerController {
$this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody);
}
private function listBackup() : void {
private function listBackup(?\Closure $addToStreamingResponseBody = null) : void {
$this->configurationManager->backupMode = 'list';
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
$this->PerformRecursiveContainerStart($id, true, $addToStreamingResponseBody);
}
public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response {