summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r--routers/web/repo/repo.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index b4bab5960b..a1e652f94c 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -161,12 +161,12 @@ func Create(ctx *context.Context) {
func handleCreateError(ctx *context.Context, owner *user_model.User, err error, name string, tpl base.TplName, form interface{}) {
switch {
- case models.IsErrReachLimitOfRepo(err):
+ case repo_model.IsErrReachLimitOfRepo(err):
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form)
- case models.IsErrRepoAlreadyExist(err):
+ case repo_model.IsErrRepoAlreadyExist(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form)
- case models.IsErrRepoFilesAlreadyExist(err):
+ case repo_model.IsErrRepoFilesAlreadyExist(err):
ctx.Data["Err_RepoName"] = true
switch {
case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories):
@@ -278,13 +278,13 @@ func Action(ctx *context.Context) {
var err error
switch ctx.Params(":action") {
case "watch":
- err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, true)
+ err = repo_model.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, true)
case "unwatch":
- err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, false)
+ err = repo_model.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, false)
case "star":
- err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, true)
+ err = repo_model.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, true)
case "unstar":
- err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, false)
+ err = repo_model.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, false)
case "accept_transfer":
err = acceptOrRejectRepoTransfer(ctx, true)
case "reject_transfer":