diff --git a/app.py b/app.py index a7368ed..10c414a 100644 --- a/app.py +++ b/app.py @@ -121,7 +121,7 @@ def proxy_save_subscription(): return jsonify({"error": str(e)}), 502 @app.route('/send-test-notification', methods=['POST']) -def proxy_send_test_notification(): +def send_test_notification_proxy(): """Proxies the request to send a test notification to the backend.""" if not session.get("logged_in"): return jsonify({'error': 'Unauthorized'}), 401 diff --git a/templates/base.html b/templates/base.html index fbbb887..4d22d01 100644 --- a/templates/base.html +++ b/templates/base.html @@ -68,7 +68,7 @@ document.getElementById('version-link').addEventListener('click', function(event) { event.preventDefault(); - fetch('/send-test-notification', { + fetch('{{ url_for("send_test_notification_proxy") }}', { method: 'POST' }).then(response => response.json()) .then(data => console.log(data.message))