download: exceptions should be thrown

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-08 19:30:53 -07:00
parent 41a9e306cb
commit 95e358c382
1 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class DownloadController extends GenericApiController
$session->remove($key); $session->remove($key);
if (null === $info) { if (null === $info) {
return Exceptions::NotFound('handle'); throw Exceptions::NotFound('handle');
} }
$name = $info[0].'-'.date('YmdHis'); $name = $info[0].'-'.date('YmdHis');
@ -104,7 +104,7 @@ class DownloadController extends GenericApiController
// Check if we have any valid ids // Check if we have any valid ids
if (0 === \count($fileIds)) { if (0 === \count($fileIds)) {
return Exceptions::NotFound('file IDs'); throw Exceptions::NotFound('file IDs');
} }
// Download single file // Download single file