Skip to content

Commit 131a3b3

Browse files
committed
Add logs settings
1 parent b0ec8a3 commit 131a3b3

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

cmd/web/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
_ "website-pb/migrations"
1818
)
1919

20-
// TODO: 用.env初始化SMTP和设置
2120
// TODO: 发送各种邮件
2221

2322
const version string = "v1.0.0-alpha"

migrations/1769475161_init_settings.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ func init() {
1515

1616
config.InitRateLimitRule(settings)
1717

18-
err := app.Save(settings)
19-
if err != nil {
20-
return err
21-
}
18+
settings.Logs.MaxDays = 90
2219

23-
return nil
20+
return app.Save(settings)
2421
}, func(app core.App) error {
2522
// add down queries...
26-
23+
println("[Init Settings] Cannot Down the migration")
2724
return nil
2825
})
2926
}

0 commit comments

Comments
 (0)