mirror of
https://github.com/miniflux/v2.git
synced 2025-08-31 18:31:01 +00:00
Improve request package and add more unit tests
This commit is contained in:
parent
844680e573
commit
9d08139f43
49 changed files with 916 additions and 400 deletions
|
@ -14,11 +14,7 @@ import (
|
|||
|
||||
// FeedIcon returns a feed icon.
|
||||
func (c *Controller) FeedIcon(w http.ResponseWriter, r *http.Request) {
|
||||
feedID, err := request.IntParam(r, "feedID")
|
||||
if err != nil {
|
||||
json.BadRequest(w, err)
|
||||
return
|
||||
}
|
||||
feedID := request.RouteInt64Param(r, "feedID")
|
||||
|
||||
if !c.store.HasIcon(feedID) {
|
||||
json.NotFound(w, errors.New("This feed doesn't have any icon"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue