Fixed incorrect subscriber SQL fetch check
This commit is contained in:
parent
229fd7f0c1
commit
0a86ae761b
|
@ -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 New Issue