From d4fcf940471588f16b7587f6d8a69b9085841369 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 22 May 2023 20:30:08 -0700 Subject: [PATCH] refactor: download controller params Signed-off-by: Varun Patil --- lib/Controller/DownloadController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Controller/DownloadController.php b/lib/Controller/DownloadController.php index ae4825ed..2e6f85dc 100644 --- a/lib/Controller/DownloadController.php +++ b/lib/Controller/DownloadController.php @@ -42,11 +42,10 @@ class DownloadController extends GenericApiController * * Request to download one or more files */ - public function request(): Http\Response + public function request($files): Http\Response { - return Util::guardEx(function () { + return Util::guardEx(function () use ($files) { // Get ids from body - $files = $this->request->getParam('files'); if (null === $files || !\is_array($files)) { throw Exceptions::MissingParameter('files'); }