diff --git a/backend/controller/log_datasource.go b/backend/controller/log_datasource.go index 50a80f8..fd44258 100644 --- a/backend/controller/log_datasource.go +++ b/backend/controller/log_datasource.go @@ -40,7 +40,8 @@ func (h *LogDSHandler) List(c *gin.Context) { if sources == nil { sources = []model.LogDataSource{} } - c.JSON(200, model.Response{Code: 200, Data: sources}) + // 按项目惯例返回 {list,total},前端 listDatasources 取 .list // Logan.Li + c.JSON(200, model.Response{Code: 200, Data: model.ListResponse{List: sources, Total: int64(len(sources))}}) } // Get GET /api/v1/log-datasources/:id