diff --git a/public/API/queries/blogPost.php b/public/API/queries/blogPost.php index 0a7443db16f2ad6bf64df8f7d7c5adc181fe0843..10939b92aee368a289102ef9e86b81c059bf937d 100644 --- a/public/API/queries/blogPost.php +++ b/public/API/queries/blogPost.php @@ -9,8 +9,7 @@ $blogPostFields = new ObjectType([ "title" => Type::string(), "content" => Type::string(), "date" => Type::string(), - "id" => Type::string(), - "error" => Type::string(), + "id" => Type::string() ], ]); @@ -22,7 +21,10 @@ function blogPost($id, $conn) $row = $result->fetch_assoc(); } else { return [ - "error" => "Post not found" + "title" => "Nicht Gefunden", + "content" => "Post wurde nicht gefunden", + "date" => "2000-01-01 00:00:00", + "id" => "-1" ]; } @@ -35,7 +37,6 @@ function blogPost($id, $conn) "title" => $title, "content" => $content, "date" => $date, - "id" => $id, - "error" => "" + "id" => $id ]; }