summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
committerUnknwon <u@gogs.io>2015-08-08 22:43:14 +0800
commitdea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5 (patch)
tree773b28a72cee24e4a02f3d162de8a37a8f912f59 /routers/repo/repo.go
parentd015d951bd6959f9585d8a83acfe7bba07b7eaad (diff)
downloadgitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.tar.gz
gitea-dea3a8c6a42ea7e4921c0e4beee5d4fd0437dbe5.zip
WIP: create PR - choose branch
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go14
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)