diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-17 11:56:50 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-17 11:56:50 -0400 |
commit | 757e4f658c400d55eab6f11f1c39c1772cf615a7 (patch) | |
tree | f3564859fac3b6df9b580da006aabbc5ebc94ff5 /routers/repo | |
parent | be8baea7ad269eb633a6b5a569b904982021723d (diff) | |
download | gitea-757e4f658c400d55eab6f11f1c39c1772cf615a7.tar.gz gitea-757e4f658c400d55eab6f11f1c39c1772cf615a7.zip |
Completely rule out the cgo
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/repo.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index edd8862794..7171ff2640 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -20,15 +20,16 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) { return } - if _, err := models.CreateRepository(ctx.User, - form.RepoName, form.Description, form.Language, form.License, - form.Visibility == "private", form.InitReadme == "on"); err == nil { + _, err := models.CreateRepository(ctx.User, form.RepoName, form.Description, + form.Language, form.License, form.Visibility == "private", form.InitReadme == "on") + if err == nil { 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) return } + ctx.Handle(200, "repo.Create", err) } func SettingPost(ctx *middleware.Context) { |