From 964318fe5d60a71761b5e9891cc5b8d3e7314110 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 11 Jun 2022 00:14:03 +0200 Subject: [PATCH] fix push notifications --- files/routes/static.py | 5 +++-- files/templates/home.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index f415489c5..215464a76 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -351,9 +351,10 @@ def formatting(v): return render_template("formatting.html", v=v) -@app.get("/worker.js") +@app.get("/service-worker.js") def serviceworker(): - with open("files/assets/js/worker.js", "r", encoding="utf-8") as f: return Response(f.read(), mimetype='application/javascript') + with open("files/assets/js/service-worker.js", "r", encoding="utf-8") as f: + return Response(f.read(), mimetype='application/javascript') @app.get("/settings/security") @auth_required diff --git a/files/templates/home.html b/files/templates/home.html index 5339fb351..153870846 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -203,7 +203,7 @@ {% if PUSHER_ID != 'blahblahblah' and v %}
{{request.host}}{{v.id}}
{{PUSHER_ID}}
- +