diff --git a/.air.toml b/.air.toml index f024cc5..a3b918c 100644 --- a/.air.toml +++ b/.air.toml @@ -17,7 +17,6 @@ args_bin = [ "-pdfs tmp/pdfs", "-pics tmp/pics", "-port 8080", - "-rss tmp/orientexpress_alle.rss", "-title 'Freimaurer Distrikt Niedersachsen und Sachsen-Anhalt'", "-web web", "-width 1024", diff --git a/cmd/backend/config.go b/cmd/backend/config.go index d21a780..fd2e056 100644 --- a/cmd/backend/config.go +++ b/cmd/backend/config.go @@ -26,7 +26,6 @@ type Config struct { PDFDir string PicsDir string Port string - RSSFile string Title string WebDir string MaxImgHeight int @@ -48,7 +47,6 @@ func newConfig() *Config { PDFDir: "/var/www/cpolis/pdfs", PicsDir: "/var/www/cpolis/pics", Port: ":8080", - RSSFile: "/var/www/cpolis/cpolis.rss", WebDir: "/var/www/cpolis/web", } } @@ -117,7 +115,6 @@ func (c *Config) handleCliArgs() error { flag.StringVar(&c.LogFile, "log", c.LogFile, "log file") flag.StringVar(&c.PDFDir, "pdfs", c.PDFDir, "pdf directory") flag.StringVar(&c.PicsDir, "pics", c.PicsDir, "pictures directory") - flag.StringVar(&c.RSSFile, "rss", c.RSSFile, "RSS file") flag.StringVar(&c.Title, "title", c.Title, "channel title") flag.StringVar(&c.WebDir, "web", c.WebDir, "web directory") flag.IntVar(&c.MaxImgHeight, "height", c.MaxImgHeight, "maximum image height") @@ -246,14 +243,6 @@ func (c *Config) setupConfig(cliConfig *Config) error { c.Port = cliConfig.Port } - if cliConfig.RSSFile != defaultConfig.RSSFile { - c.RSSFile = cliConfig.RSSFile - } - c.RSSFile, err = mkFile(c.RSSFile, 0600, 0700) - if err != nil { - return fmt.Errorf("error setting up file: %v", err) - } - if cliConfig.Title != defaultConfig.Title { c.Title = cliConfig.Title } diff --git a/cmd/calls/rss.go b/cmd/calls/rss.go deleted file mode 100644 index d2757a7..0000000 --- a/cmd/calls/rss.go +++ /dev/null @@ -1,17 +0,0 @@ -package calls - -import ( - "net/http" - - b "streifling.com/jason/cpolis/cmd/backend" -) - -func ServeRSS(c *b.Config) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - if !tokenIsVerified(w, r, c) { - return - } - - http.ServeFile(w, r, c.RSSFile) - } -} diff --git a/cmd/main.go b/cmd/main.go index 4e96b1e..76874be 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -72,7 +72,6 @@ func main() { mux.HandleFunc("GET /logout", f.Logout(config, store)) mux.HandleFunc("GET /pdf/get-list", c.ServePDFList(config)) mux.HandleFunc("GET /pdf/serve/{id}", c.ServePDF(config)) - mux.HandleFunc("GET /rss/serve", c.ServeRSS(config)) mux.HandleFunc("GET /tag/create", f.CreateTag(config, store)) mux.HandleFunc("GET /user/create", f.CreateUser(config, store)) mux.HandleFunc("GET /user/delete/{id}", f.DeleteUser(config, db, store))