From e9fdf1031da4bf3c1acff0377b1d125ad99274e6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 15 Mar 2014 05:53:13 -0400 Subject: [PATCH] Clean code --- models/repo2.go | 4 ++++ templates/repo/created.tmpl | 8 -------- web.go | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 templates/repo/created.tmpl diff --git a/models/repo2.go b/models/repo2.go index ef0131d83e..6aa6eda60c 100644 --- a/models/repo2.go +++ b/models/repo2.go @@ -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 import ( diff --git a/templates/repo/created.tmpl b/templates/repo/created.tmpl deleted file mode 100644 index 35803e3938..0000000000 --- a/templates/repo/created.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -
-
- Created successfully! -
-
-{{template "base/footer" .}} \ No newline at end of file diff --git a/web.go b/web.go index cb6ee4aece..24f01d68a8 100644 --- a/web.go +++ b/web.go @@ -62,7 +62,7 @@ func runWeb(*cli.Context) { m.Use(sessions.Sessions("my_session", store)) // 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/logout", auth.SignInRequire(true), user.SignOut) m.Any("/user/sign_up", auth.SignOutRequire(), binding.BindIgnErr(auth.RegisterForm{}), user.SignUp)