1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Show dashbard

This commit is contained in:
Unknown 2014-03-24 11:58:46 -04:00
parent 414ebe7553
commit 6337d3bf19
3 changed files with 4 additions and 4 deletions

View file

@ -100,7 +100,7 @@ func newService() {
Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false) Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false)
} }
func NewLogService() { func newLogService() {
// Get and check log mode. // Get and check log mode.
LogMode = Cfg.MustValue("log", "MODE", "console") LogMode = Cfg.MustValue("log", "MODE", "console")
modeSec := "log." + LogMode modeSec := "log." + LogMode
@ -296,7 +296,7 @@ func NewConfigContext() {
func NewServices() { func NewServices() {
newService() newService()
NewLogService() newLogService()
newCacheService() newCacheService()
newSessionService() newSessionService()
newMailService() newMailService()

View file

@ -45,6 +45,7 @@ gogs serv provide access auth for repositories`,
} }
func init() { func init() {
os.MkdirAll("log", os.ModePerm)
log.NewLogger(10000, "file", fmt.Sprintf(`{"filename":"%s"}`, "log/serv.log")) log.NewLogger(10000, "file", fmt.Sprintf(`{"filename":"%s"}`, "log/serv.log"))
} }
@ -72,7 +73,6 @@ func runServ(k *cli.Context) {
base.NewConfigContext() base.NewConfigContext()
models.LoadModelsConfig() models.LoadModelsConfig()
models.NewEngine() models.NewEngine()
base.NewLogService()
keys := strings.Split(os.Args[2], "-") keys := strings.Split(os.Args[2], "-")
if len(keys) != 2 { if len(keys) != 2 {

2
web.go
View file

@ -89,7 +89,7 @@ func runWeb(*cli.Context) {
reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true})
// Routers. // Routers.
m.Get("/", reqSignIn, routers.Home) m.Get("/", ignSignIn, routers.Home)
m.Get("/issues", reqSignIn, user.Issues) m.Get("/issues", reqSignIn, user.Issues)
m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/pulls", reqSignIn, user.Pulls)
m.Get("/stars", reqSignIn, user.Stars) m.Get("/stars", reqSignIn, user.Stars)