Final fixes to the website which should have been committed in the previous branch :(
Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
Vendored
+4
-3
@@ -52,8 +52,6 @@ $app->get("/timelineData/{timeline}", function (Request $request, Response $resp
|
||||
$response->getBody()->write(json_encode($timelineData->getWorkData()));
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// something went wrong
|
||||
$response->getBody()->write(json_encode(array("errorMessage" => "Error, timeline data not found")));
|
||||
@@ -73,7 +71,6 @@ $app->patch("/timelineData/{timeline}/{id}", function (Request $request, Respons
|
||||
return $response->withStatus(400);
|
||||
}
|
||||
|
||||
|
||||
if (!$timelineData->updateEduData($data["dateFrom"], $data["dateTo"], $data["grade"], $data["course"], $args["id"]))
|
||||
{
|
||||
// uh oh something went wrong
|
||||
@@ -81,6 +78,7 @@ $app->patch("/timelineData/{timeline}/{id}", function (Request $request, Respons
|
||||
return $response->withStatus(500);
|
||||
}
|
||||
|
||||
$response->withStatus(201);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -100,6 +98,7 @@ $app->patch("/timelineData/{timeline}/{id}", function (Request $request, Respons
|
||||
return $response->withStatus(500);
|
||||
}
|
||||
|
||||
$response->withStatus(201);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -160,6 +159,7 @@ $app->post("/timelineData/{timeline}", function (Request $request, Response $res
|
||||
}
|
||||
|
||||
$response->getBody()->write(json_encode(array("ID" => $insertedID)));
|
||||
$response->withStatus(201);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -186,6 +186,7 @@ $app->post("/timelineData/{timeline}", function (Request $request, Response $res
|
||||
}
|
||||
|
||||
$response->getBody()->write(json_encode(array("ID" => $insertedID)));
|
||||
$response->withStatus(201);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -79,7 +79,7 @@ class middleware
|
||||
$app->add(new JwtAuthentication([
|
||||
"rules" => [
|
||||
new RequestPathRule([
|
||||
"path" => ["/api/projectData", "/api/timeline/[a-z]*", "/api/logout"],
|
||||
"path" => ["/api/projectData", "/api/timelineData/[a-z]*", "/api/projectImage/[0-9]*", "/api/logout"],
|
||||
"ignore" => ["/api/contact", "/api/user/login", "/api/user/changePassword"]
|
||||
]),
|
||||
new RequestMethodRule([
|
||||
|
||||
Reference in New Issue
Block a user