pass Session object to Request
Some checks failed
soko-web/pipeline/pr-master There was a failure building this commit

This commit is contained in:
Bence Pőcze 2023-05-02 11:16:20 +02:00
parent 9ade08d8bd
commit bad61a1bf3
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -26,14 +26,14 @@ class Request implements IRequest
array $get, array $get,
array $post, array $post,
array $headers, array $headers,
array &$session, Session $session,
IUserRepository $userRepository) IUserRepository $userRepository)
{ {
$this->base = $base; $this->base = $base;
$this->get = $get; $this->get = $get;
$this->post = $post; $this->post = $post;
$this->headers = $headers; $this->headers = $headers;
$this->session = new Session($session); $this->session = $session;
$userId = $this->session->get('userId'); $userId = $this->session->get('userId');
if ($userId !== null) { if ($userId !== null) {