diff options
author | 2021-02-18 20:34:58 -0800 | |
---|---|---|
committer | 2021-02-18 20:49:06 -0800 | |
commit | 4855fbd13f8c9be1a593db2db05052cb49954e0b (patch) | |
tree | 61467d5b63d15b3362e52c64957e730ebbfcd374 /ui/static_javascript.go | |
parent | 9569666259a71d12438d4484ce9fc43309fea99c (diff) | |
download | v2-4855fbd13f8c9be1a593db2db05052cb49954e0b.tar.gz v2-4855fbd13f8c9be1a593db2db05052cb49954e0b.tar.zst v2-4855fbd13f8c9be1a593db2db05052cb49954e0b.zip |
Use embed package for Javascript bundles instead of generated files
Diffstat (limited to 'ui/static_javascript.go')
-rw-r--r-- | ui/static_javascript.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/static_javascript.go b/ui/static_javascript.go index de6b342e..cbe95827 100644 --- a/ui/static_javascript.go +++ b/ui/static_javascript.go @@ -16,7 +16,7 @@ import ( func (h *handler) showJavascript(w http.ResponseWriter, r *http.Request) { filename := request.RouteStringParam(r, "name") - etag, found := static.JavascriptsChecksums[filename] + etag, found := static.JavascriptBundleChecksums[filename] if !found { html.NotFound(w, r) return @@ -24,7 +24,7 @@ func (h *handler) showJavascript(w http.ResponseWriter, r *http.Request) { response.New(w, r).WithCaching(etag, 48*time.Hour, func(b *response.Builder) { b.WithHeader("Content-Type", "text/javascript; charset=utf-8") - b.WithBody(static.Javascripts[filename]) + b.WithBody(static.JavascriptBundles[filename]) b.Write() }) } |