From d302679f072f08ba13b63d59d184714a6a555d64 Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 18 Jun 2018 15:38:00 -0500 Subject: [PATCH] fix incorrect json case #59 --- app/rest/api/rest_public.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rest/api/rest_public.go b/app/rest/api/rest_public.go index 17800afa..bb3268ca 100644 --- a/app/rest/api/rest_public.go +++ b/app/rest/api/rest_public.go @@ -173,8 +173,8 @@ func (s *Rest) findUserCommentsCtrl(w http.ResponseWriter, r *http.Request) { } resp := struct { - Comments []store.Comment - Count int + Comments []store.Comment `json:"comments,omitempty"` + Count int `json:"count,omitempty"` }{} log.Printf("[DEBUG] get comments for userID %s, %s", userID, siteID)