Commit 7e63ff50 authored by Zohten's avatar Zohten

created response

parent c09958b2
......@@ -25,6 +25,11 @@ class Response
return new Response(200, $message);
}
public static function createdResponse($message = "")
{
return new Response(201, $message);
}
public static function notFoundResponse($message = "")
{
return new Response(404, $message);
......
......@@ -106,7 +106,7 @@ class UserController extends Controller
{
User::addRow($array);
$message = json_encode(["message" => 'User succesfully added!']);
$response = Response::okResponse($message);
$response = Response::createdResponse($message);
return $response;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment