static_javascript.go 567 B

123456789101112131415161718
  1. // Copyright 2018 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package ui
  5. import (
  6. "net/http"
  7. "time"
  8. "github.com/miniflux/miniflux/http/response"
  9. "github.com/miniflux/miniflux/ui/static"
  10. )
  11. // Javascript renders application client side code.
  12. func (c *Controller) Javascript(w http.ResponseWriter, r *http.Request) {
  13. response.Cache(w, r, "text/javascript; charset=utf-8", static.JavascriptChecksums["app"], []byte(static.Javascript["app"]), 48*time.Hour)
  14. }