gsd 4 months ago
parent
commit
58cec33615
  1. 2
      dbService.py
  2. 2
      webExtensions/publicEndpoints.py

2
dbService.py

@ -47,7 +47,7 @@ class DbService:
async def oneNode(self, num: int):
collection = self.dbStore['node_info']
c = await collection.find_one(
{"num":num},
{"num":int(num)},
sort=[("ts", -1)]
)
return c

2
webExtensions/publicEndpoints.py

@ -56,7 +56,7 @@ class WebExtension:
async def userNode(request:Request):
userNum = request.cookies.get(self.core.authManager.NUM, None)
userNode = await self.dbService.oneNode(userNum)
if userNum:
if userNum is not None:
return NodeDTO(userNode)
else:
return {}
Loading…
Cancel
Save