refactor: download controller params

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-22 20:30:08 -07:00
parent a11b347c6f
commit d4fcf94047
1 changed files with 2 additions and 3 deletions

View File

@ -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');
}