Fix empty raw query in subscriber query response

This commit is contained in:
Kailash Nadh 2018-11-30 13:49:13 +05:30
parent b7d5a4d8c8
commit 3867062002
1 changed files with 1 additions and 1 deletions

View File

@ -148,13 +148,13 @@ func handleQuerySubscribers(c echo.Context) error {
fmt.Sprintf("Error fetching subscriber lists: %v", pqErrMsg(err)))
}
out.Query = query
if len(out.Results) == 0 {
out.Results = make(models.Subscribers, 0)
return c.JSON(http.StatusOK, okResp{out})
}
// Meta.
out.Query = query
out.Page = pg.Page
out.PerPage = pg.PerPage