Skip to content

Commit

Permalink
fix: close serviceworker.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
hartungstenio committed Mar 12, 2024
1 parent fcbf132 commit 8375eec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pwa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@


def service_worker(request):
response = HttpResponse(
open(app_settings.PWA_SERVICE_WORKER_PATH).read(), content_type="application/javascript"
)
with open(app_settings.PWA_SERVICE_WORKER_PATH) as serviceworker_file:
response = HttpResponse(
serviceworker_file.read(),
content_type="application/javascript",
)
return response


Expand Down

0 comments on commit 8375eec

Please sign in to comment.