1
0
Fork 0
forked from forgejo/forgejo

Remove cache avatar support and add its tests

This commit is contained in:
Unknwon 2016-02-14 23:14:55 -05:00
parent fd92d91da3
commit 58e004f7da
14 changed files with 45 additions and 390 deletions

View file

@ -34,7 +34,6 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
"github.com/gogits/gogs/modules/avatar"
"github.com/gogits/gogs/modules/bindata"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
@ -245,11 +244,6 @@ func runWeb(ctx *cli.Context) {
})
// ***** END: User *****
// Gravatar service.
avt := avatar.CacheServer("public/img/avatar/", "public/img/avatar_default.jpg")
os.MkdirAll("public/img/avatar/", os.ModePerm)
m.Get("/avatar/:hash", avt.ServeHTTP)
adminReq := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: true, AdminRequire: true})
// ***** START: Admin *****