diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 2d37f58..16c93a0 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -64,7 +64,7 @@ final class ApiController extends Controller $session = $this->createSessionFromRequest($request); if ($session === null) { - $response->header->status = RequestStatusCode::R_400; + $response->header->status = RequestStatusCode::R_403; $this->createInvalidCreateResponse($request, $response, $session); return; diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index e6f89e3..a0172be 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -61,6 +61,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase $this->app = new class() extends ApplicationAbstract { protected string $appName = 'Api'; + protected int $appId = 1; }; $this->app->dbPool = $GLOBALS['dbpool'];