mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-13 18:00:05 +00:00
go fmt
This commit is contained in:
@@ -244,7 +244,7 @@ func (s *Server) handleFeedList(c *router.Context) {
|
||||
if len(items) > 0 {
|
||||
s.db.CreateItems(items)
|
||||
s.db.SetFeedSize(feed.Id, len(items))
|
||||
s.db.SyncSearch()
|
||||
s.db.SyncSearch()
|
||||
}
|
||||
s.worker.FindFeedFavicon(*feed)
|
||||
|
||||
@@ -476,9 +476,9 @@ func (s *Server) handleOPMLExport(c *router.Context) {
|
||||
func (s *Server) handlePageCrawl(c *router.Context) {
|
||||
url := c.Req.URL.Query().Get("url")
|
||||
|
||||
if newUrl := silo.RedirectURL(url); newUrl != "" {
|
||||
url = newUrl
|
||||
}
|
||||
if newUrl := silo.RedirectURL(url); newUrl != "" {
|
||||
url = newUrl
|
||||
}
|
||||
if content := silo.VideoIFrame(url); content != "" {
|
||||
c.JSON(http.StatusOK, map[string]string{
|
||||
"content": sanitizer.Sanitize(url, content),
|
||||
@@ -494,9 +494,9 @@ func (s *Server) handlePageCrawl(c *router.Context) {
|
||||
}
|
||||
content, err := readability.ExtractContent(strings.NewReader(body))
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, map[string]string{
|
||||
"content": "error: " + err.Error(),
|
||||
})
|
||||
c.JSON(http.StatusOK, map[string]string{
|
||||
"content": "error: " + err.Error(),
|
||||
})
|
||||
return
|
||||
}
|
||||
content = sanitizer.Sanitize(url, content)
|
||||
|
Reference in New Issue
Block a user