Fix empty raw query in subscriber query response
This commit is contained in:
parent
b7d5a4d8c8
commit
3867062002
|
@ -148,13 +148,13 @@ func handleQuerySubscribers(c echo.Context) error {
|
||||||
fmt.Sprintf("Error fetching subscriber lists: %v", pqErrMsg(err)))
|
fmt.Sprintf("Error fetching subscriber lists: %v", pqErrMsg(err)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.Query = query
|
||||||
if len(out.Results) == 0 {
|
if len(out.Results) == 0 {
|
||||||
out.Results = make(models.Subscribers, 0)
|
out.Results = make(models.Subscribers, 0)
|
||||||
return c.JSON(http.StatusOK, okResp{out})
|
return c.JSON(http.StatusOK, okResp{out})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Meta.
|
// Meta.
|
||||||
out.Query = query
|
|
||||||
out.Page = pg.Page
|
out.Page = pg.Page
|
||||||
out.PerPage = pg.PerPage
|
out.PerPage = pg.PerPage
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue