summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index fb54d4ef8b..52d0773f87 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -18,7 +18,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
ctx.Data["PageIsNewRepo"] = true // For navbar arrow.
ctx.Data["LanguageIgns"] = models.LanguageIgns
ctx.Data["Licenses"] = models.Licenses
- ctx.HTML(200, "repo/create", ctx.Data)
+ ctx.Render.HTML(200, "repo/create", ctx.Data)
return
}
@@ -26,7 +26,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
form.Language, form.License, form.Visibility == "private", form.InitReadme == "on")
if err == nil {
log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName)
- ctx.Redirect("/"+ctx.User.Name+"/"+form.RepoName, 302)
+ ctx.Render.Redirect("/"+ctx.User.Name+"/"+form.RepoName, 302)
return
} else if err == models.ErrRepoAlreadyExist {
ctx.RenderWithErr("Repository name has already been used", "repo/create", &form)
@@ -37,7 +37,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
func SettingPost(ctx *middleware.Context) {
if !ctx.Repo.IsOwner {
- ctx.Error(404)
+ ctx.Render.Error(404)
return
}
@@ -45,7 +45,7 @@ func SettingPost(ctx *middleware.Context) {
case "delete":
if len(ctx.Repo.Repository.Name) == 0 || ctx.Repo.Repository.Name != ctx.Query("repository") {
ctx.Data["ErrorMsg"] = "Please make sure you entered repository name is correct."
- ctx.HTML(200, "repo/setting", ctx.Data)
+ ctx.Render.HTML(200, "repo/setting", ctx.Data)
return
}
@@ -56,5 +56,5 @@ func SettingPost(ctx *middleware.Context) {
}
log.Trace("%s Repository deleted: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, ctx.Repo.Repository.LowerName)
- ctx.Redirect("/", 302)
+ ctx.Render.Redirect("/", 302)
}