feat: add match view server-rendered shell

This commit is contained in:
Keith Solomon
2026-07-26 00:13:40 -05:00
parent 51f57d309a
commit b444f98aa0
3 changed files with 106 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace BattleForge\Http\Handlers;
use BattleForge\Http\Request;
use BattleForge\Http\Response;
final class GetMatchView
{
/** @param array<string, string> $params */
public function handle(Request $request, array $params): Response
{
$csrf = $request->cookies['__csrf'] ?? '';
ob_start();
require_once __DIR__ . '/../../Views/layout.php';
require __DIR__ . '/../../Views/match.php';
$body = (string) ob_get_clean();
return Response::html(200, $body);
}
}