|
|
@@ -287,7 +287,7 @@ func DatasetAction(ctx *context.Context) { |
|
|
|
func CurrentRepoDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
keyword := strings.Trim(ctx.Query("q"), " ") |
|
|
|
|
|
|
|
repo := ctx.Repo.Repository |
|
|
|
var datasetIDs []int64 |
|
|
@@ -325,15 +325,16 @@ func CurrentRepoDataset(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
"result_code": "0", |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func MyDataset(ctx *context.Context) { |
|
|
|
func MyDatasets(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
keyword := strings.Trim(ctx.Query("q"), " ") |
|
|
|
|
|
|
|
uploaderID := ctx.User.ID |
|
|
|
datasets, count, err := models.Attachments(&models.AttachmentsOptions{ |
|
|
@@ -363,15 +364,16 @@ func MyDataset(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
"result_code": "0", |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func PublicDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
keyword := strings.Trim(ctx.Query("q"), " ") |
|
|
|
|
|
|
|
datasets, count, err := models.Attachments(&models.AttachmentsOptions{ |
|
|
|
ListOptions: models.ListOptions{ |
|
|
@@ -400,15 +402,16 @@ func PublicDataset(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
"result_code": "0", |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
page := ctx.QueryInt("page") |
|
|
|
cloudbrainType := ctx.QueryInt("type") |
|
|
|
keyword := strings.Trim(ctx.Query("search"), " ") |
|
|
|
keyword := strings.Trim(ctx.Query("q"), " ") |
|
|
|
|
|
|
|
var datasetIDs []int64 |
|
|
|
|
|
|
@@ -448,7 +451,8 @@ func MyFavoriteDataset(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
"result_code": "0", |
|
|
|
"data": string(data), |
|
|
|
"count": strconv.FormatInt(count, 10), |
|
|
|
}) |
|
|
|
} |