Browse Source

Clean code

for-closed-social
Unknown 10 years ago
parent
commit
e9fdf1031d
3 changed files with 5 additions and 9 deletions
  1. +4
    -0
      models/repo2.go
  2. +0
    -8
      templates/repo/created.tmpl
  3. +1
    -1
      web.go

+ 4
- 0
models/repo2.go View File

@ -1,3 +1,7 @@
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package models package models
import ( import (

+ 0
- 8
templates/repo/created.tmpl View File

@ -1,8 +0,0 @@
{{template "base/head" .}}
{{template "base/navbar" .}}
<div class="container" id="gogs-body">
<div class="col-md-offset-4 col-md-3">
Created successfully!
</div>
</div>
{{template "base/footer" .}}

+ 1
- 1
web.go View File

@ -62,7 +62,7 @@ func runWeb(*cli.Context) {
m.Use(sessions.Sessions("my_session", store)) m.Use(sessions.Sessions("my_session", store))
// Routers. // Routers.
m.Get("/", auth.SignInRequire(false), routers.Home)
m.Get("/", auth.SignInRequire(true), routers.Home)
m.Any("/user/login", auth.SignOutRequire(), binding.BindIgnErr(auth.LogInForm{}), user.SignIn) m.Any("/user/login", auth.SignOutRequire(), binding.BindIgnErr(auth.LogInForm{}), user.SignIn)
m.Any("/user/logout", auth.SignInRequire(true), user.SignOut) m.Any("/user/logout", auth.SignInRequire(true), user.SignOut)
m.Any("/user/sign_up", auth.SignOutRequire(), binding.BindIgnErr(auth.RegisterForm{}), user.SignUp) m.Any("/user/sign_up", auth.SignOutRequire(), binding.BindIgnErr(auth.RegisterForm{}), user.SignUp)

Loading…
Cancel
Save