aboutsummaryrefslogtreecommitdiffhomepage
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/subscription.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api/subscription.go b/api/subscription.go
index 701759d..55d0dd8 100644
--- a/api/subscription.go
+++ b/api/subscription.go
@@ -13,20 +13,20 @@ import (
// GetSubscriptions is the API handler to find subscriptions.
func (c *Controller) GetSubscriptions(w http.ResponseWriter, r *http.Request) {
- subscriptionInfo, err := decodeURLPayload(r.Body)
- if err != nil {
- json.BadRequest(w, r, err)
+ subscriptionInfo, bodyErr := decodeURLPayload(r.Body)
+ if bodyErr != nil {
+ json.BadRequest(w, r, bodyErr)
return
}
- subscriptions, err := subscription.FindSubscriptions(
+ subscriptions, finderErr := subscription.FindSubscriptions(
subscriptionInfo.URL,
subscriptionInfo.UserAgent,
subscriptionInfo.Username,
subscriptionInfo.Password,
)
- if err != nil {
- json.ServerError(w, r, err)
+ if finderErr != nil {
+ json.ServerError(w, r, finderErr)
return
}