diff options
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r-- | routers/web/repo/repo.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index 30cb888dce..c2c79e4a0d 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -152,7 +152,7 @@ func Create(ctx *context.Context) { templateID := ctx.FormInt64("template_id") if templateID > 0 { templateRepo, err := repo_model.GetRepositoryByID(templateID) - if err == nil && models.CheckRepoUnitUser(templateRepo, ctxUser, unit.TypeCode) { + if err == nil && models.CheckRepoUnitUser(ctx, templateRepo, ctxUser, unit.TypeCode) { ctx.Data["repo_template"] = templateID ctx.Data["repo_template_name"] = templateRepo.Name } @@ -223,7 +223,7 @@ func CreatePost(ctx *context.Context) { var repo *repo_model.Repository var err error if form.RepoTemplate > 0 { - opts := models.GenerateRepoOptions{ + opts := repo_module.GenerateRepoOptions{ Name: form.RepoName, Description: form.Description, Private: form.Private, @@ -304,7 +304,7 @@ func Action(ctx *context.Context) { ctx.Repo.Repository.Description = ctx.FormString("desc") ctx.Repo.Repository.Website = ctx.FormString("site") - err = models.UpdateRepository(ctx.Repo.Repository, false) + err = repo_service.UpdateRepository(ctx.Repo.Repository, false) } if err != nil { @@ -509,7 +509,7 @@ func InitiateDownload(ctx *context.Context) { // SearchRepo repositories via options func SearchRepo(ctx *context.Context) { - opts := &models.SearchRepoOptions{ + opts := &repo_model.SearchRepoOptions{ ListOptions: db.ListOptions{ Page: ctx.FormInt("page"), PageSize: convert.ToCorrectPageSize(ctx.FormInt("limit")), @@ -581,7 +581,7 @@ func SearchRepo(ctx *context.Context) { } var err error - repos, count, err := models.SearchRepository(opts) + repos, count, err := repo_model.SearchRepository(opts) if err != nil { ctx.JSON(http.StatusInternalServerError, api.SearchError{ OK: false, |