fix token iteration and passing to godoor
This commit is contained in:
@@ -71,10 +71,12 @@ async def view_doorboy_uids(request):
|
||||
"inventory.owner.username": {"$in": users},
|
||||
}
|
||||
prj = {"token.uid_hash": True}
|
||||
tokens = await request.app.ctx.db.inventory.find(flt, prj).to_list()
|
||||
|
||||
tokensRaw = await request.app.ctx.db.inventory.find(flt, prj).to_list()
|
||||
|
||||
tokens = [item["token"]["uid_hash"] for item in tokensRaw]
|
||||
|
||||
print(f"delegating {len(tokens)} doorkey tokens")
|
||||
return json({"allowed_uids": tokens})
|
||||
return json({"allowed_hashes": tokens})
|
||||
|
||||
|
||||
def datetime_to_json_formatting(o):
|
||||
|
||||
Reference in New Issue
Block a user