mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Remove cache avatar support and add its tests
This commit is contained in:
		| @@ -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 ***** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user