fix: add vapid diagnostics
This commit is contained in:
+8
-1
@@ -104,7 +104,14 @@ def today(request):
|
||||
"next_date": day + timedelta(days=1),
|
||||
"chart": build_chart(readings),
|
||||
"reading_count": len(readings),
|
||||
# Empty when push is not configured; the page then hides the card.
|
||||
# Empty when push is not configured; the card then says so rather than
|
||||
# vanishing, because a missing card looks like a bug in the page.
|
||||
"vapid_public_key": settings.VAPID_PUBLIC_KEY,
|
||||
"doses_with_reminders": ScheduledDose.objects.filter(
|
||||
is_active=True,
|
||||
medication__is_active=True,
|
||||
reminder_time__isnull=False,
|
||||
).count(),
|
||||
"subscribed_devices": request.user.push_subscriptions.count(),
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user