Skip to content
Snippets Groups Projects
Verified Commit 5c001a99 authored by Jonas Leder's avatar Jonas Leder
Browse files

update error message

parent 7e371dac
No related branches found
No related tags found
1 merge request!8Rewrite API endpoint to graphql
......@@ -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
];
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment