File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/lib/Server/Controller Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1111use ApiPlatform \OpenApi \Factory \OpenApiFactory ;
1212use ApiPlatform \OpenApi \Model ;
1313use Ibexa \Rest \Server \Controller as RestController ;
14- use Symfony \Component \HttpFoundation \Request ;
1514use Symfony \Component \HttpFoundation \Response ;
1615use Symfony \Component \HttpKernel \HttpKernelInterface ;
1716
@@ -71,7 +70,7 @@ public function createView()
7170 $ response = $ this ->forward ('ezpublish_rest.controller.views:createView ' );
7271
7372 // Add 301 status code and location href
74- $ response ->setStatusCode (301 );
73+ $ response ->setStatusCode (Response:: HTTP_MOVED_PERMANENTLY );
7574 $ response ->headers ->set ('Location ' , $ this ->router ->generate ('ibexa.rest.views.create ' ));
7675
7776 return $ response ;
@@ -80,7 +79,7 @@ public function createView()
8079 /**
8180 * @param string $controller
8281 *
83- * @return \Symfony\Component\HttpFoundation\ Response
82+ * @return Response
8483 */
8584 protected function forward ($ controller )
8685 {
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ protected function logout(Request $request): Response
9090 $ domain
9191 );
9292
93- $ response ->setStatusCode (404 );
93+ $ response ->setStatusCode (Response:: HTTP_NOT_FOUND );
9494 $ requestSession ->clear ();
9595
9696 return $ response ;
You can’t perform that action at this time.
0 commit comments