|
|
@@ -51,6 +51,28 @@ func CurrentRepoDatasetMultiple(ctx *context.APIContext) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func CurrentRepoDatasetInfoWithoutAttachment(ctx *context.APIContext) { |
|
|
|
dataset, err := models.GetDatasetByRepo(ctx.Repo.Repository) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
log.Warn("can not get dataset.", err) |
|
|
|
ctx.JSON(200, map[string]interface{}{ |
|
|
|
"code": 0, |
|
|
|
"message": "", |
|
|
|
"data": []*api.Dataset{}, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
dataset.Repo = ctx.Repo.Repository |
|
|
|
ctx.JSON(200, map[string]interface{}{ |
|
|
|
"code": 0, |
|
|
|
"message": "", |
|
|
|
"data": []*api.Dataset{convert.ToDataset(dataset)}, |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func MyDatasetsMultiple(ctx *context.APIContext) { |
|
|
|
|
|
|
|
opts := &models.SearchDatasetOptions{ |
|
|
|