Skip to content

Commit

Permalink
fix: Avoid redirects without 3xx status code
Browse files Browse the repository at this point in the history
  • Loading branch information
leocavalcante committed Aug 18, 2023
1 parent 430a1f5 commit 49f3311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Controller/PersonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function create(PersonRequest $request, ResponseInterface $response): Mes
$this->redis->set($person['nick'], '.');
$this->redis->set($person['id'], json_encode($person));

return $response->json($person)->withStatus(201)->withHeader('Location', "/pessoas/{$person['id']}");
return $response->json($person)->withStatus(201);
}

public function show(RequestInterface $request, ResponseInterface $response, string $id): MessageResponseInterface
Expand Down

0 comments on commit 49f3311

Please sign in to comment.