Editable feed link

This commit is contained in:
Adam Szkoda
2024-04-16 20:26:36 +02:00
committed by Nazar Kanaev
parent 379aaed39e
commit b01f71de1a
4 changed files with 21 additions and 3 deletions

View File

@@ -294,6 +294,11 @@ func (s *Server) handleFeed(c *router.Context) {
s.db.UpdateFeedFolder(id, &folderId)
}
}
if link, ok := body["link"]; ok {
if reflect.TypeOf(link).Kind() == reflect.String {
s.db.UpdateFeedLink(id, link.(string))
}
}
c.Out.WriteHeader(http.StatusOK)
} else if c.Req.Method == "DELETE" {
s.db.DeleteFeed(id)