fixed array error

This commit is contained in:
2021-12-28 21:35:21 +00:00
parent 97718c7aee
commit 3984d13a20
2 changed files with 11 additions and 12 deletions
+9 -9
View File
@@ -49,15 +49,15 @@ $app->get("/timelineData/{timeline}", function (Request $request, Response $resp
$json = json_encode($result);
$response->getBody()->write($json);
//if it is an error give a 403 code since it can't find the data
if(array_key_exists("errorMessage", $result[-1]))
{
$response = $response->withStatus(403);
}
//use content type json to indicate json data on frontend.
return $response->withHeader("Content-Type", "application/json");
return $response;
// //if it is an error give a 403 code since it can't find the data
// if(array_key_exists("errorMessage", $result[-1]))
// {
// $response = $response->withStatus(403);
// }
//
// //use content type json to indicate json data on frontend.
// return $response->withHeader("Content-Type", "application/json");
});
$app->get('/projectData', function (Request $request, Response $response)