From 39aa56454eecce22735e8256267036b5bf79c1f6 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Thu, 9 Jul 2020 23:29:55 +0530 Subject: [PATCH] Fix missing API response data{} envelope --- subscribers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscribers.go b/subscribers.go index c76d8d9..dda279d 100644 --- a/subscribers.go +++ b/subscribers.go @@ -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. @@ -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.