Check for pgx.ErrNoRows to return proper 404
This commit is contained in:
@@ -787,6 +787,7 @@ func (h *AuthHandler) UpdateUserMaxDevices(c echo.Context) error {
|
||||
return c.JSON(http.StatusInternalServerError, map[string]string{"error": err.Error()})
|
||||
}
|
||||
|
||||
_ = user // Suppress unused variable warning when sqlc returns user
|
||||
return c.JSON(http.StatusOK, map[string]string{"message": "max devices updated"})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user