Skip to content

Commit

Permalink
Fix missing API response data{} envelope
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jul 9, 2020
1 parent 525a510 commit 39aa564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func handleGetSubscriber(c echo.Context) error {
return err
}

return c.JSON(http.StatusOK, sub)
return c.JSON(http.StatusOK, okResp{sub})
}

// handleQuerySubscribers handles querying subscribers based on an arbitrary SQL expression.
Expand Down Expand Up @@ -214,7 +214,7 @@ func handleUpdateSubscriber(c echo.Context) error {
}
_ = sendOptinConfirmation(sub, []int64(req.Lists), app)

return c.JSON(http.StatusOK, sub)
return c.JSON(http.StatusOK, okResp{sub})
}

// handleGetSubscriberSendOptin sends an optin confirmation e-mail to a subscriber.
Expand Down

0 comments on commit 39aa564

Please sign in to comment.