mirror of
https://git.cant.at/Madeorsk/PollVerlaine
synced 2024-11-25 07:14:32 +01:00
206 Created
This commit is contained in:
parent
a031045f66
commit
57648296b5
@ -20,7 +20,7 @@ Flight::route("POST /polls", function () {
|
||||
$request_json = $request->data;
|
||||
$poll = Poll::create_poll($request_json);
|
||||
if ($poll)
|
||||
Flight::json(format_poll($poll), 206);
|
||||
Flight::json(format_poll($poll), 201);
|
||||
else
|
||||
Flight::halt(403, "<h1>403 Forbidden</h1><h3>Invalid data.</h3>");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user