mirror of
https://github.com/nkanaev/yarr.git
synced 2026-06-10 02:13:21 +00:00
refactor feedstate + swap implementation
This commit is contained in:
@@ -162,7 +162,15 @@ func (s *Server) handleFeedRefresh(c *router.Context) {
|
||||
}
|
||||
|
||||
func (s *Server) handleFeedErrors(c *router.Context) {
|
||||
errors := s.db.GetFeedErrors()
|
||||
errors := make(map[int64]string)
|
||||
states, err := s.db.ListFeedStates()
|
||||
if err == nil {
|
||||
for _, state := range states {
|
||||
if state.LastError != "" {
|
||||
errors[state.FeedID] = state.LastError
|
||||
}
|
||||
}
|
||||
}
|
||||
c.JSON(http.StatusOK, errors)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user