mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 13:46:42 +02:00
feat(endpoints): fix api response headers and status codes
This commit is contained in:
@@ -151,8 +151,8 @@ class Api
|
||||
$response->getBody()->write(serializers()->json()->encode($body));
|
||||
}
|
||||
|
||||
$response->withStatus($status);
|
||||
$response->withHeader('Content-Type', 'application/json;charset=' . registry()->get('flextype.settings.charset'));
|
||||
$response = $response->withStatus($status);
|
||||
$response = $response->withHeader('Content-Type', 'application/json;charset=' . registry()->get('flextype.settings.charset'));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
Reference in New Issue
Block a user