From: Michael Tremer Date: Thu, 9 Mar 2023 14:57:16 +0000 (+0000) Subject: hub: Add function to grab multiple downloads X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=773db069351af3ff034450fe97438b85aa603f12;p=pbs.git hub: Add function to grab multiple downloads Signed-off-by: Michael Tremer --- diff --git a/src/hub/handlers.py b/src/hub/handlers.py index f259864b..6e842a6d 100644 --- a/src/hub/handlers.py +++ b/src/hub/handlers.py @@ -105,6 +105,15 @@ class BaseHandler(BackendMixin, tornado.web.RequestHandler): if uuid: return self.backend.uploads.get_by_uuid(uuid) + def get_argument_uploads(self, *args, **kwargs): + """ + Returns a list of uploads + """ + uuids = self.get_arguments(*args, **kwargs) + + # Return all uploads + return [self.backend.uploads.get_by_uuid(uuid) for uuid in uuids] + # Hello World