206 Created

This commit is contained in:
Tagadda 2018-08-13 13:02:25 +02:00
parent a031045f66
commit 57648296b5
1 changed files with 1 additions and 1 deletions

View File

@ -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>");
}