diff --git a/api/internal/handler/data_loader/route_export.go b/api/internal/handler/data_loader/route_export.go index aa8218cef3..e589410bef 100644 --- a/api/internal/handler/data_loader/route_export.go +++ b/api/internal/handler/data_loader/route_export.go @@ -115,14 +115,14 @@ var ( func (h *Handler) ExportAllRoutes(c droplet.Context) (interface{}, error) { routelist, err := h.routeStore.List(c.Context(), store.ListInput{}) - if len(routelist.Rows) < 1 { - return nil, consts.ErrRouteData - } - if err != nil { return nil, err } + if len(routelist.Rows) < 1 { + return nil, consts.ErrRouteData + } + routes := []*entity.Route{} for _, route := range routelist.Rows {