diff options
author | 无闻 <joe2010xtmf@163.com> | 2014-03-23 10:45:06 -0400 |
---|---|---|
committer | 无闻 <joe2010xtmf@163.com> | 2014-03-23 10:45:06 -0400 |
commit | 8b43bd1c37d740f8670d8502c65918151af24cb8 (patch) | |
tree | 6fc09df1b6bef1a73fac40771702ae5f4f71f1d4 /web.go | |
parent | f7f175a0793a53f3c50d20d89e324a610f94c442 (diff) | |
parent | 4bac3616055110da6f060e98174bc2381ef91286 (diff) |
Merge pull request #32 from shxsun/master
finish gravatar module
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) |