v0.1.2 - Added edit function

fixed create function
Deleted old update
This commit is contained in:
Anders
2021-06-08 14:08:24 +02:00
parent 2c89fb79f6
commit 576992b365
8 changed files with 67 additions and 71 deletions
+2 -5
View File
@@ -13,9 +13,6 @@ if(isset($_POST['title'])){
$post->description = $_POST['description'];
//Call the save function.
if(!$post->save()){
return http_response_code(400);
}else{
echo $post->id;
}
if($post->save())
echo json_encode(array($post->id, $post->created_at));
}