forked from PrestaShop/autoupgrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add middleware for update page post update
- Loading branch information
1 parent
7c1b3f7
commit 5bb496b
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace PrestaShop\Module\AutoUpgrade\Router\Middlewares; | ||
|
||
use PrestaShop\Module\AutoUpgrade\Router\Routes; | ||
|
||
class UpdateLogExists extends AbstractMiddleware | ||
{ | ||
public function process(): ?string | ||
{ | ||
if ($this->upgradeContainer->getLogsState()->getActiveUpdateLogFile() === null) { | ||
return Routes::HOME_PAGE; | ||
} | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters