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

master
Alix JEUDI--LEMOINE 22 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 # Check if already has a subscription
if current_user.get("push_subscriptions"): if current_user.push_subscriptions:
# Add another subscription # Add another subscription
users_collection.update_one( users_collection.update_one(
{"username": current_user.username}, {"username": current_user.username},

Loading…
Cancel
Save