Skip to content
Snippets Groups Projects
Commit 92174198 authored by Jean-Laurent DUZANT's avatar Jean-Laurent DUZANT
Browse files

FEAT #21555 TIME 0:05 add check delay -1

parent 4833c6f8
No related branches found
No related tags found
No related merge requests found
...@@ -242,6 +242,7 @@ class IndexingController ...@@ -242,6 +242,7 @@ class IndexingController
public function getProcessLimitDate(Request $request, Response $response) public function getProcessLimitDate(Request $request, Response $response)
{ {
$delay = -1;
$queryParams = $request->getQueryParams(); $queryParams = $request->getQueryParams();
if (!empty($queryParams['doctype'])) { if (!empty($queryParams['doctype'])) {
...@@ -258,6 +259,9 @@ class IndexingController ...@@ -258,6 +259,9 @@ class IndexingController
} }
$delay = $priority['delays']; $delay = $priority['delays'];
} }
if ($delay == -1) {
return $response->withJson(['processLimitDate' => null]);
}
if (!Validator::intVal()->validate($delay)) { if (!Validator::intVal()->validate($delay)) {
return $response->withStatus(400)->withJson(['errors' => 'Delay is not a numeric value']); return $response->withStatus(400)->withJson(['errors' => 'Delay is not a numeric value']);
} }
......
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