🐛 Fixed access to user subscriptions in push notification subscription route.

master
Alix JEUDI--LEMOINE 16 hours ago
parent c3e4851200
commit 373d7aebe6

@ -32,7 +32,7 @@ async def subscribe(subscription: PushSubscription, current_user: User = Depends
)
# Check if already has a subscription
if current_user.get("push_subscriptions"):
if current_user.push_subscriptions:
# Add another subscription
users_collection.update_one(
{"username": current_user.username},

Loading…
Cancel
Save