This commit is contained in:
Nazar Kanaev
2023-02-02 22:06:27 +00:00
parent 012b58bbe4
commit 632412c10e
16 changed files with 61 additions and 51 deletions

View File

@@ -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)