Various updates

This commit is contained in:
2023-06-08 20:49:27 -04:00
parent 3ed5acf75e
commit 9307ba330c
45 changed files with 864 additions and 188 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace ProVM\Common\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use ProVM\Common\Service\Install as Service;
class Install
{
public function __construct(protected Service $service) {}
public function __invoke(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
if (!$this->service->check()) {
$this->service->install();
}
return $handler->handle($request);
}
}