mirror of https://github.com/miniflux/v2.git
Use different variable names for localized errors
This commit is contained in:
parent
15a11c3da9
commit
715575001a
|
@ -13,20 +13,20 @@ import (
|
||||||
|
|
||||||
// GetSubscriptions is the API handler to find subscriptions.
|
// GetSubscriptions is the API handler to find subscriptions.
|
||||||
func (c *Controller) GetSubscriptions(w http.ResponseWriter, r *http.Request) {
|
func (c *Controller) GetSubscriptions(w http.ResponseWriter, r *http.Request) {
|
||||||
subscriptionInfo, err := decodeURLPayload(r.Body)
|
subscriptionInfo, bodyErr := decodeURLPayload(r.Body)
|
||||||
if err != nil {
|
if bodyErr != nil {
|
||||||
json.BadRequest(w, r, err)
|
json.BadRequest(w, r, bodyErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
subscriptions, err := subscription.FindSubscriptions(
|
subscriptions, finderErr := subscription.FindSubscriptions(
|
||||||
subscriptionInfo.URL,
|
subscriptionInfo.URL,
|
||||||
subscriptionInfo.UserAgent,
|
subscriptionInfo.UserAgent,
|
||||||
subscriptionInfo.Username,
|
subscriptionInfo.Username,
|
||||||
subscriptionInfo.Password,
|
subscriptionInfo.Password,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if finderErr != nil {
|
||||||
json.ServerError(w, r, err)
|
json.ServerError(w, r, finderErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue