From 057795b186ed5dffb6749cfa542925b4515b938c Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 8 Dec 2022 14:40:31 -0800 Subject: [PATCH] download: add UseSession annotation --- lib/Controller/AlbumsController.php | 2 ++ lib/Controller/DownloadController.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/Controller/AlbumsController.php b/lib/Controller/AlbumsController.php index 081bd990d..61667f148 100644 --- a/lib/Controller/AlbumsController.php +++ b/lib/Controller/AlbumsController.php @@ -55,6 +55,8 @@ public function albums(int $t = 0): JSONResponse /** * @NoAdminRequired * + * @UseSession + * * Download an album as a zip file */ public function download(string $name = ''): JSONResponse diff --git a/lib/Controller/DownloadController.php b/lib/Controller/DownloadController.php index a83c40a42..265f162f2 100644 --- a/lib/Controller/DownloadController.php +++ b/lib/Controller/DownloadController.php @@ -36,6 +36,8 @@ class DownloadController extends ApiBase * * @PublicPage * + * @UseSession + * * Request to download one or more files */ public function request(): JSONResponse @@ -55,6 +57,8 @@ public function request(): JSONResponse /** * Get a handle for downloading files. * + * The calling controller must have the UseSession annotation. + * * @param string $name Name of zip file * @param int[] $files */