summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/admin/users.go2
-rw-r--r--routers/api/v1/repo/repo.go4
-rw-r--r--routers/install.go10
-rw-r--r--routers/repo/pull.go2
-rw-r--r--routers/repo/repo.go4
5 files changed, 11 insertions, 11 deletions
diff --git a/routers/admin/users.go b/routers/admin/users.go
index 04e331d229..c95aba7729 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -60,7 +60,7 @@ func NewUser(ctx *context.Context) {
}
// NewUserPost response for adding a new user
-func NewUserPost(ctx *context.Context, form auth.AdminCrateUserForm) {
+func NewUserPost(ctx *context.Context, form auth.AdminCreateUserForm) {
ctx.Data["Title"] = ctx.Tr("admin.users.new_account")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminUsers"] = true
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 6ae513db16..1fa0b14b40 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -177,8 +177,8 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
ctxUser := ctx.User
// Not equal means context user is an organization,
// or is another user/organization if current user is admin.
- if form.Uid != ctxUser.ID {
- org, err := models.GetUserByID(form.Uid)
+ if form.UID != ctxUser.ID {
+ org, err := models.GetUserByID(form.UID)
if err != nil {
if models.IsErrUserNotExist(err) {
ctx.Error(422, "", err)
diff --git a/routers/install.go b/routers/install.go
index ed8fae15f1..495aa9ab79 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -89,7 +89,7 @@ func Install(ctx *context.Context) {
form.Domain = setting.Domain
form.SSHPort = setting.SSH.Port
form.HTTPPort = setting.HTTPPort
- form.AppUrl = setting.AppURL
+ form.AppURL = setting.AppURL
form.LogRootPath = setting.LogRootPath
// E-mail service settings
@@ -217,8 +217,8 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
return
}
- if form.AppUrl[len(form.AppUrl)-1] != '/' {
- form.AppUrl += "/"
+ if form.AppURL[len(form.AppURL)-1] != '/' {
+ form.AppURL += "/"
}
// Save settings.
@@ -242,7 +242,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
cfg.Section("").Key("RUN_USER").SetValue(form.RunUser)
cfg.Section("server").Key("DOMAIN").SetValue(form.Domain)
cfg.Section("server").Key("HTTP_PORT").SetValue(form.HTTPPort)
- cfg.Section("server").Key("ROOT_URL").SetValue(form.AppUrl)
+ cfg.Section("server").Key("ROOT_URL").SetValue(form.AppURL)
if form.SSHPort == 0 {
cfg.Section("server").Key("DISABLE_SSH").SetValue("true")
@@ -328,5 +328,5 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
log.Info("First-time run install finished!")
ctx.Flash.Success(ctx.Tr("install.install_success"))
- ctx.Redirect(form.AppUrl + "user/login")
+ ctx.Redirect(form.AppURL + "user/login")
}
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index bc958bdda1..389fcb0898 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -94,7 +94,7 @@ func ForkPost(ctx *context.Context, form auth.CreateRepoForm) {
return
}
- ctxUser := checkContextUser(ctx, form.Uid)
+ ctxUser := checkContextUser(ctx, form.UID)
if ctx.Written() {
return
}
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index df1c3feb4c..fa111d5e4a 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -112,7 +112,7 @@ func CreatePost(ctx *context.Context, form auth.CreateRepoForm) {
ctx.Data["Licenses"] = models.Licenses
ctx.Data["Readmes"] = models.Readmes
- ctxUser := checkContextUser(ctx, form.Uid)
+ ctxUser := checkContextUser(ctx, form.UID)
if ctx.Written() {
return
}
@@ -167,7 +167,7 @@ func Migrate(ctx *context.Context) {
func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) {
ctx.Data["Title"] = ctx.Tr("new_migrate")
- ctxUser := checkContextUser(ctx, form.Uid)
+ ctxUser := checkContextUser(ctx, form.UID)
if ctx.Written() {
return
}