notifications....again

This commit is contained in:
Karl 2025-07-18 15:56:56 +01:00
parent c494a90227
commit 44fa24f2b7

7
app.py
View File

@ -176,7 +176,12 @@ def send_test_notification():
if not session.get("logged_in"):
return jsonify({'error': 'Unauthorized'}), 401
subscriptions = get_push_subscriptions()
try:
subscriptions = get_push_subscriptions()
except Exception as e:
print(f"Error getting push subscriptions: {e}")
return jsonify({"error": "Could not retrieve push subscriptions from the database."}), 500
if not subscriptions:
return jsonify({"message": "No push subscriptions found."}), 404