Linked backend with frontend and styled curriculum vitae for mobile

This commit is contained in:
2021-08-31 18:50:08 +01:00
parent 539e6cc23d
commit b88c35ca5b
12 changed files with 158 additions and 79 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ $app->get("/timelineData/{timeline}", function (Request $request, Response $resp
}
else
{
$result = array("errorMessage" => "Error, timeline data not found");
$result = array(array("errorMessage" => "Error, timeline data not found"));
}
$json = json_encode($result);
@@ -48,7 +48,7 @@ $app->get("/timelineData/{timeline}", function (Request $request, Response $resp
$response->getBody()->write($json);
//if it is an error give a 404 code since it can't find the data
if(array_key_exists(“errorMessage”, $result))
if(array_key_exists("errorMessage", $result[0]))
{
$response = $response->withStatus(404);
}