update error message
This commit is contained in:
parent
7e371dac06
commit
5c001a992b
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue