Update some namespacing and errors.

This commit is contained in:
Dave Smith-Hayes 2025-04-15 21:48:39 -04:00
parent 4477962d3a
commit 0a1077c2dc
5 changed files with 7 additions and 7 deletions

View File

@ -42,7 +42,7 @@ use Slovocast\Infrastructure\Api\Database\DatabaseHandlerInterface;
use Slovocast\Infrastructure\Database\DatabaseHandler; use Slovocast\Infrastructure\Database\DatabaseHandler;
use Slovocast\Infrastructure\Api\User\UserAuthorizationInterface; use Slovocast\Infrastructure\Api\User\UserAuthorizationInterface;
use Slovocast\Infrastructure\User\BasicUserAuthorization; use Slovocast\Infrastructure\User\BasicUserAuthorization;
use Slovocast\Infrastructrue\Api\User\UserSessionManagerInterface; use Slovocast\Infrastructure\Api\User\UserSessionManagerInterface;
use Slovocast\Infrastructure\User\UserSessionManager; use Slovocast\Infrastructure\User\UserSessionManager;

View File

@ -10,6 +10,6 @@ class CreateChannelPage extends Handler
{ {
public function handle(): Response public function handle(): Response
{ {
return $this->render('channel/create.twig', [ 'form_key' => $formKey ]); return $this->render('channel/create.twig');
} }
} }

View File

@ -10,6 +10,6 @@ class RegisterUserPage extends Handler
{ {
public function handle(): Response public function handle(): Response
{ {
return $this->render('user/register.twig', [ 'form_key' => $formKey ]); return $this->render('user/register.twig');
} }
} }

View File

@ -6,6 +6,6 @@ use Slovocast\Domain\Entity\User;
interface UserSessionManagerInterface interface UserSessionManagerInterface
{ {
public function setUserAuthenticatedState(User $user): void; public function setAuthenticatedState(User $user): void;
public function clearUserAuthenticatedState(): void; public function clearAuthenticatedState(): void;
} }

View File

@ -12,13 +12,13 @@ class UserSessionManager implements UserSessionManagerInterface
protected SessionInterface $session protected SessionInterface $session
) { } ) { }
public function setUserAuthenticatedState(User $user): void public function setAuthenticatedState(User $user): void
{ {
$this->session->set('authenticated', true); $this->session->set('authenticated', true);
$this->session->set('user', $user->toArray()); $this->session->set('user', $user->toArray());
} }
public function clearUserAuthenticatedState(): void public function clearAuthenticatedState(): void
{ {
$this->session->delete('authenticated'); $this->session->delete('authenticated');
$this->session->delete('user'); $this->session->delete('user');