mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-24 00:33:14 +00:00
refactoring
This commit is contained in:
parent
d01060ba3b
commit
475c5d96d7
@ -1,4 +1,4 @@
|
|||||||
package worker
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/url"
|
"net/url"
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user