2024-03-09 10:25:20 +01:00
|
|
|
package view
|
2024-02-27 09:03:21 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
2024-04-03 21:05:12 +02:00
|
|
|
"path/filepath"
|
2024-02-27 09:03:21 +01:00
|
|
|
|
2024-03-10 15:03:46 +01:00
|
|
|
"streifling.com/jason/cpolis/cmd/control"
|
2024-02-27 09:03:21 +01:00
|
|
|
)
|
|
|
|
|
2024-04-03 21:05:12 +02:00
|
|
|
func ShowRSS(c *control.CliArgs) http.HandlerFunc {
|
2024-02-27 09:03:21 +01:00
|
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
2024-04-03 21:05:12 +02:00
|
|
|
w.Header().Add("Content-Disposition", "attachment; filename=\""+filepath.Base(c.RSSFile)+"\"")
|
|
|
|
http.ServeFile(w, r, c.RSSFile)
|
2024-02-27 09:03:21 +01:00
|
|
|
}
|
|
|
|
}
|