refactoring

This commit is contained in:
Nazar Kanaev 2020-07-05 23:42:27 +01:00
parent d01060ba3b
commit 475c5d96d7
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
package worker package server
import ( import (
"net/url" "net/url"

View File

@ -1,7 +1,6 @@
package server package server
import ( import (
"github.com/nkanaev/yarr/worker"
"github.com/nkanaev/yarr/storage" "github.com/nkanaev/yarr/storage"
"github.com/mmcdole/gofeed" "github.com/mmcdole/gofeed"
"net/http" "net/http"
@ -137,7 +136,7 @@ func FeedListHandler(rw http.ResponseWriter, req *http.Request) {
contentType := res.Header.Get("Content-Type") contentType := res.Header.Get("Content-Type")
if strings.HasPrefix(contentType, "text/html") || contentType == "" { if strings.HasPrefix(contentType, "text/html") || contentType == "" {
sources, err := worker.FindFeeds(res) sources, err := FindFeeds(res)
if err != nil { if err != nil {
log.Print(err) log.Print(err)
rw.WriteHeader(http.StatusBadRequest) rw.WriteHeader(http.StatusBadRequest)