rewrite worker

This commit is contained in:
Nazar Kanaev
2021-03-24 12:07:15 +00:00
parent 1f393faf79
commit a2bfd1682b
3 changed files with 121 additions and 117 deletions

View File

@@ -116,7 +116,7 @@ func (s *Server) handleFolder(c *router.Context) {
func (s *Server) handleFeedRefresh(c *router.Context) {
if c.Req.Method == "POST" {
s.worker.FetchAllFeeds()
s.worker.RefreshFeeds()
c.Out.WriteHeader(http.StatusOK)
} else {
c.Out.WriteHeader(http.StatusMethodNotAllowed)
@@ -342,7 +342,7 @@ func (s *Server) handleOPMLImport(c *router.Context) {
}
}
s.worker.FetchAllFeeds()
s.worker.RefreshFeeds()
c.Out.WriteHeader(http.StatusOK)
} else {
c.Out.WriteHeader(http.StatusMethodNotAllowed)