Skip to content

Commit c74a9f5

Browse files
committed
fix response status code for addnewuser
1 parent 436d2f6 commit c74a9f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/controllers/UsersController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function addNewUser() : void {
6767
}
6868

6969
header('Content-Type: application/json');
70-
http_response_code(empty($result) ? 404 : 200);
70+
http_response_code(empty($result) ? 400 : 201);
7171
echo json_encode([
7272
"status"=>"success",
7373
"message"=> $message,

0 commit comments

Comments
 (0)