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

FEAT #20284 TIME 0 get queryParams in getReturnFast

parent d4c3e95b
No related branches found
No related tags found
No related merge requests found
......@@ -99,8 +99,7 @@ $app->get('/documents/{id}/history', \History\controllers\HistoryController::cla
$app->put('/documents/{id}/actions/{actionId}', \Document\controllers\DocumentController::class . ':setAction');
$app->get('/documents/{id}/workflow', \Workflow\controllers\WorkflowController::class . ':getByDocumentId');
$app->get('/documents/{id}/workflows/{workflowId}/files/{fileId}', \Workflow\controllers\YousignController::class . ':getByFileId');
$app->get('/documents/{id}/workflows/{workflowId}/files/{fileId}/fastStatus/{fastStatus}', \Workflow\controllers\FastOTPController::class . ':getReturnFast');
$app->get('/externalSignatoryBookReturn/{token}/status/{status}', \Workflow\controllers\FastOTPController::class . ':getReturnFast');
$app->get('/externalSignatoryBookReturn', \Workflow\controllers\FastOTPController::class . ':getReturnFast');
$app->get('/documents/{id}/linkedMailing', \Document\controllers\DocumentController::class . ':getLinkedMailing');
$app->get('/documents/{id}/thumbnails/{page}', \Document\controllers\DocumentController::class . ':getThumbnailContent');
$app->put('/documents/{id}/workflows/interrupt', \Workflow\controllers\WorkflowController::class . ':interrupt');
......
......@@ -123,13 +123,15 @@ class FastOTPController
public function getReturnFast(Request $request, Response $response, array $args)
{
$checkToken = FastOTPController::checkToken(['token' => $args['token'] ?? null]);
$queryParams = $request->getQueryParams();
$checkToken = FastOTPController::checkToken(['token' => $queryParams['token'] ?? null]);
if (!empty($checkToken['errors'])) {
return $response->withStatus(400)->withJson(['errors' => $checkToken['errors']]);
}
$documentId = $checkToken['documentId'];
$workflowId = $checkToken['workflowId'];
$fastStatus = $args['status'] ?? null;
$fastStatus = $queryParams['status'] ?? null;
$workflow = WorkflowModel::get([
......
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