wire user texts routes and update seed

open POST /api/texts and node create endpoints to any
authenticated user; expose new /texts and /texts/{id} pages
plus admin-only GET /api/texts/all. ViewController gains
userTexts and userText methods. seed gives Tanach to the
regular user and adds a second non-admin user.
This commit is contained in:
Yisroel Baum 2026-05-02 21:43:48 +03:00
parent acdf703d80
commit 051e44033f
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 38 additions and 7 deletions

View file

@ -30,6 +30,26 @@ class ViewController
return $response;
}
public function userTexts(Response $response): Response
{
$html = file_get_contents(
__DIR__ . '/../../views/templates/userTexts.php'
);
$response->getBody()->write($html);
return $response;
}
public function userText(Response $response): Response
{
$html = file_get_contents(
__DIR__ . '/../../views/templates/userText.php'
);
$response->getBody()->write($html);
return $response;
}
public function home(Response $response): Response
{
$html = file_get_contents(__DIR__ . '/../../views/templates/home.php', true);