mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 06:20:14 +00:00
Extract getLatestMajorVersion() to avoid duplicating the version string
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/d5ec921f-8629-4f6e-949a-e8f89f1eb85f Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
da06f6833c
commit
f29a3d58e7
@@ -15,6 +15,10 @@ use Slim\Psr7\NonBufferedBody;
|
||||
readonly class DockerController {
|
||||
private const string TOP_CONTAINER = 'nextcloud-aio-apache';
|
||||
|
||||
private function getLatestMajorVersion(): string {
|
||||
return '33';
|
||||
}
|
||||
|
||||
public function __construct(
|
||||
private DockerActionManager $dockerActionManager,
|
||||
private ContainerDefinitionFetcher $containerDefinitionFetcher,
|
||||
@@ -221,7 +225,7 @@ readonly class DockerController {
|
||||
}
|
||||
|
||||
if (isset($request->getParsedBody()['install_latest_major'])) {
|
||||
$installLatestMajor = '33';
|
||||
$installLatestMajor = $this->getLatestMajorVersion();
|
||||
} else {
|
||||
$installLatestMajor = '';
|
||||
}
|
||||
@@ -329,7 +333,7 @@ readonly class DockerController {
|
||||
}
|
||||
|
||||
public function RunNextcloudUpgradeToLatestMajor(Request $request, Response $response, array $args) : Response {
|
||||
$this->configurationManager->installLatestMajor = '33';
|
||||
$this->configurationManager->installLatestMajor = $this->getLatestMajorVersion();
|
||||
|
||||
// Get streaming response start and closure
|
||||
$nonbufResp = $this->startStreamingResponse($response);
|
||||
|
||||
Reference in New Issue
Block a user