diff --git a/routes/api.py b/routes/api.py index 3af7415..d503b96 100644 --- a/routes/api.py +++ b/routes/api.py @@ -224,7 +224,7 @@ def send_expiry_notifications_route(username: str, password: str) -> Response: @requires_basic_auth def send_test_notification_route(username: str, password: str) -> Response: """Sends a test push notification to all users.""" - data = request.get_json() + data = request.get_json(silent=True) message = data.get("message", "Ktv Test") if data else "Ktv Test" try: