notifications....again
This commit is contained in:
parent
c494a90227
commit
44fa24f2b7
7
app.py
7
app.py
@ -176,7 +176,12 @@ def send_test_notification():
|
|||||||
if not session.get("logged_in"):
|
if not session.get("logged_in"):
|
||||||
return jsonify({'error': 'Unauthorized'}), 401
|
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:
|
if not subscriptions:
|
||||||
return jsonify({"message": "No push subscriptions found."}), 404
|
return jsonify({"message": "No push subscriptions found."}), 404
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user