Reorganize project part 2

This commit is contained in:
Bernd Bestel
2018-04-11 19:49:35 +02:00
parent bcd5092427
commit 79b4bad014
54 changed files with 1985 additions and 826 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace Grocy\Middleware;
class JsonMiddleware
{
public function __construct(\Slim\Container $container) {
$this->container = $container;
}
protected $container;
public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next)
{
$response = $next($request, $response, $next);
return $response->withHeader('Content-Type', 'application/json');
}
}