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
|
|
@ -4,6 +4,7 @@ $texts = [
|
|||
[
|
||||
'id' => 0,
|
||||
'name' => 'Tanach',
|
||||
'userId' => 1,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
@ -31,6 +32,7 @@ $nodes = [
|
|||
// Default credentials:
|
||||
// admin@example.com / admin1234 (admin)
|
||||
// user@example.com / password1 (regular user)
|
||||
// user2@example.com / password2 (second regular user, no texts seeded)
|
||||
$users = [
|
||||
[
|
||||
'id' => 0,
|
||||
|
|
@ -44,6 +46,12 @@ $users = [
|
|||
'passwordHash' => password_hash('password1', PASSWORD_DEFAULT),
|
||||
'isAdmin' => false,
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'email' => 'user2@example.com',
|
||||
'passwordHash' => password_hash('password2', PASSWORD_DEFAULT),
|
||||
'isAdmin' => false,
|
||||
],
|
||||
];
|
||||
|
||||
$plans = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue