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:
parent
acdf703d80
commit
051e44033f
3 changed files with 38 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue