forked from k-space/doorboy-proxy
s/eventlog/doorlog/
This commit is contained in:
@@ -146,7 +146,7 @@ async def view_longpoll(request):
|
||||
}
|
||||
]
|
||||
try:
|
||||
async with request.app.ctx.db.eventlog.watch(pipeline) as stream:
|
||||
async with request.app.ctx.db.doorlog.watch(pipeline) as stream:
|
||||
await response.send("data: watch-stream-opened\n\n")
|
||||
async for event in stream:
|
||||
ev = event["fullDocument"]
|
||||
@@ -205,7 +205,6 @@ async def swipe(request):
|
||||
)
|
||||
|
||||
event_swipe = {
|
||||
"component": "doorboy",
|
||||
"method": "card",
|
||||
"timestamp": timestamp,
|
||||
"door": data["door"],
|
||||
@@ -218,7 +217,7 @@ async def swipe(request):
|
||||
},
|
||||
"uid_hash": data["uid_hash"],
|
||||
}
|
||||
await request.app.ctx.db.eventlog.insert_one(event_swipe)
|
||||
await request.app.ctx.db.doorlog.insert_one(event_swipe)
|
||||
|
||||
return text("ok")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user