From 5c001a992bce9132fc8a8a9122b9994d9d075aa8 Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas.leder@jobrouter.com>
Date: Tue, 8 Mar 2022 11:14:31 +0100
Subject: [PATCH] update error message

---
 public/API/queries/blogPost.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/public/API/queries/blogPost.php b/public/API/queries/blogPost.php
index 0a7443d..10939b9 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
     ];
 }
-- 
GitLab