Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary redirect in the job viewer rest stack. #1269

Merged
merged 1 commit into from
Mar 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions classes/Rest/Controllers/WarehouseControllerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function searchHistory(Request $request, Application $app)
} elseif ($jobId !== null && $recordId !== null && $realm !== null) {
$result = $this->processJobByJobId($app, $user, $realm, $jobId, $action);
} elseif ($recordId !== null && $realm !== null) {
$result = $this->processHistoryRecordRequest($request, $app, $user, $recordId, $action);
$result = $this->getHistoryById($request, $app, $recordId);
} elseif ($realm !== null && $title !== null) {
$result = $this->getHistoryByTitle($request, $app, $realm, $title);
} elseif ($realm !== null) {
Expand Down Expand Up @@ -1716,20 +1716,6 @@ private function processJobByJobId(
);
}

/**
* @param Request $request
* @param Application $app
* @param XDUser $user
* @param int $recordId
* @param string $action
* @return \Symfony\Component\HttpFoundation\JsonResponse
*/
private function processHistoryRecordRequest(Request $request, Application $app, XDUser $user, $recordId, $action)
{
$url = $request->getBasePath() . $request->getPathInfo() . "/$recordId?".$request->getQueryString();
return $app->redirect($url);
}

/**
* @param Application $app
* @param XDUser $user
Expand Down