diff options
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/notif.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/notif.py b/backend/notif.py index 96df3c1..d51806b 100644 --- a/backend/notif.py +++ b/backend/notif.py @@ -3,6 +3,7 @@ import sqlite3 from pywebpush import webpush from dotenv import load_dotenv from os import getenv +import json class PushSubscriptionData(BaseModel): endpoint: str @@ -64,7 +65,7 @@ def send_notification(endpoint: str, notification_payload: object): try: webpush( subscription_info=subscription_info, - data=str(notification_payload), + data=json.dumps(notification_payload), vapid_private_key=PRIVATE_VAPID_KEY, vapid_claims={ "sub": "mailto:dev@altafcreator.com", |
