forked from k-space/doorboy-proxy
Attribute token.enabled is timestamp, not boolean
This commit is contained in:
2
main.py
2
main.py
@@ -24,7 +24,7 @@ async def view_doorboy_uids(request):
|
||||
async for obj in db.member.find({"enabled": True}):
|
||||
allowed_names.append(obj["_id"])
|
||||
allowed_uids = []
|
||||
async for obj in db.inventory.find({"token.uid_hash": {"$exists":True}, "inventory.owner_id": {"$exists":True}, "token.enabled": True}, {"inventory.owner_id": True, "token.uid_hash": True }):
|
||||
async for obj in db.inventory.find({"token.uid_hash": {"$exists":True}, "inventory.owner_id": {"$exists":True}, "token.enabled": {"$exists":True}}, {"inventory.owner_id": True, "token.uid_hash": True }):
|
||||
if obj["inventory"].pop("owner_id") in allowed_names:
|
||||
del obj["_id"]
|
||||
del obj["inventory"]
|
||||
|
||||
Reference in New Issue
Block a user