database: don't return forbidden namespaces in the list request

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2021-04-20 06:34:46 -04:00
parent 3627331527
commit 2c078cbc7c
1 changed files with 2 additions and 1 deletions

View File

@ -286,7 +286,8 @@ class MoonrakerDatabase:
f"Error decoding value {bvalue}, format: {chr(fmt)}")
async def _handle_list_request(self, web_request):
return {'namespaces': list(self.namespaces.keys())}
ns_list = set(self.namespaces.keys()) - self.forbidden_namespaces
return {'namespaces': list(ns_list)}
async def _handle_item_request(self, web_request):
action = web_request.get_action()