Fixed incorrect subscriber SQL fetch check
This commit is contained in:
parent
229fd7f0c1
commit
0a86ae761b
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ func handleGetSubscriber(c echo.Context) error {
|
|||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError,
|
||||
fmt.Sprintf("Error fetching subscriber: %s", pqErrMsg(err)))
|
||||
} else if err == sql.ErrNoRows {
|
||||
} else if len(out) == 0 {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Subscriber not found.")
|
||||
}
|
||||
out.LoadLists(app.Queries.GetSubscriberLists)
|
||||
|
|
Loading…
Reference in a new issue