1
0
mirror of https://git.cant.at/Madeorsk/PollVerlaine synced 2024-11-22 07:04:32 +01:00

206 Created

This commit is contained in:
Tagadda 2018-08-13 13:02:25 +02:00
parent a031045f66
commit 57648296b5

View File

@ -20,7 +20,7 @@ Flight::route("POST /polls", function () {
$request_json = $request->data; $request_json = $request->data;
$poll = Poll::create_poll($request_json); $poll = Poll::create_poll($request_json);
if ($poll) if ($poll)
Flight::json(format_poll($poll), 206); Flight::json(format_poll($poll), 201);
else else
Flight::halt(403, "<h1>403 Forbidden</h1><h3>Invalid data.</h3>"); Flight::halt(403, "<h1>403 Forbidden</h1><h3>Invalid data.</h3>");
} }