diff options
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -17,6 +17,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/auth" + "github.com/gogits/gogs/modules/avatar" "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/mailer" @@ -93,6 +94,9 @@ func runWeb(*cli.Context) { m.Get("/stars", reqSignIn, user.Stars) m.Get("/help", routers.Help) + avatarCache := avatar.HttpHandler("public/img/avatar/", "public/img/avatar/default.jpg") + m.Get("/avatar/:hash", avatarCache.ServeHTTP) + m.Group("/user", func(r martini.Router) { r.Any("/login", binding.BindIgnErr(auth.LogInForm{}), user.SignIn) r.Any("/sign_up", binding.BindIgnErr(auth.RegisterForm{}), user.SignUp) |