From 0772476f1759f2f0d490748047881f503e38c28c Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 27 Nov 2017 09:34:41 -0300 Subject: [refactor] get namespace as an optional query arg --- src/leap/soledad/server/_streaming_resource.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/leap/soledad/server') diff --git a/src/leap/soledad/server/_streaming_resource.py b/src/leap/soledad/server/_streaming_resource.py index 9805bb7e..18e67401 100644 --- a/src/leap/soledad/server/_streaming_resource.py +++ b/src/leap/soledad/server/_streaming_resource.py @@ -54,8 +54,9 @@ class StreamingResource(Resource): assert interfaces.IBlobsBackend.providedBy(self._handler) def render_POST(self, request): - user, namespace = request.postpath - db = self.factory.open_database(user) + user = request.postpath[0] + namespace = request.args.get('namespace', ['default'])[0] + db = self._handler raw_content = request.content.read() blob_ids = json.loads(raw_content) for blob_id in blob_ids: -- cgit v1.2.3