diff options
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index dde8b58465..533bd569ad 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -33,7 +33,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User { return ctx.User } - org, err := models.GetUserById(uid) + org, err := models.GetUserByID(uid) if models.IsErrUserNotExist(err) { return ctx.User } @@ -112,7 +112,7 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) { } if repo != nil { - if errDelete := models.DeleteRepository(ctxUser.Id, repo.Id, ctxUser.Name); errDelete != nil { + if errDelete := models.DeleteRepository(ctxUser.Id, repo.ID, ctxUser.Name); errDelete != nil { log.Error(4, "DeleteRepository: %v", errDelete) } } @@ -209,7 +209,7 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { } if repo != nil { - if errDelete := models.DeleteRepository(ctxUser.Id, repo.Id, ctxUser.Name); errDelete != nil { + if errDelete := models.DeleteRepository(ctxUser.Id, repo.ID, ctxUser.Name); errDelete != nil { log.Error(4, "DeleteRepository: %v", errDelete) } } @@ -239,13 +239,13 @@ func Action(ctx *middleware.Context) { var err error switch ctx.Params(":action") { case "watch": - err = models.WatchRepo(ctx.User.Id, ctx.Repo.Repository.Id, true) + err = models.WatchRepo(ctx.User.Id, ctx.Repo.Repository.ID, true) case "unwatch": - err = models.WatchRepo(ctx.User.Id, ctx.Repo.Repository.Id, false) + err = models.WatchRepo(ctx.User.Id, ctx.Repo.Repository.ID, false) case "star": - err = models.StarRepo(ctx.User.Id, ctx.Repo.Repository.Id, true) + err = models.StarRepo(ctx.User.Id, ctx.Repo.Repository.ID, true) case "unstar": - err = models.StarRepo(ctx.User.Id, ctx.Repo.Repository.Id, false) + err = models.StarRepo(ctx.User.Id, ctx.Repo.Repository.ID, false) case "desc": if !ctx.Repo.IsOwner() { ctx.Error(404) |