]> git.ipfire.org Git - pbs.git/commitdiff
hub: Add function to grab multiple downloads
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Mar 2023 14:57:16 +0000 (14:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 9 Mar 2023 14:57:16 +0000 (14:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hub/handlers.py

index f259864ba19e34bc9e2dcd1f7a672b01ce92b5de..6e842a6d931875bba12efc6a9f67cddbafba9fbf 100644 (file)
@@ -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