feat: echo password while start every time

This commit is contained in:
Xhofe
2022-03-12 00:24:55 +08:00
parent 19d0a88b55
commit b1d7a980d9
4 changed files with 13 additions and 1 deletions

View File

@ -245,7 +245,7 @@ func InitSettings() {
if err == gorm.ErrRecordNotFound {
err = model.SaveSetting(v)
if v.Key == "password" {
log.Infof("Initial password: %s", v.Value)
log.Infof("Initial password: %s", conf.C.Sprintf(v.Value))
}
if err != nil {
log.Fatalf("failed write setting: %s", err.Error())
@ -261,6 +261,9 @@ func InitSettings() {
if err != nil {
log.Fatalf("failed write setting: %s", err.Error())
}
if v.Key == "password" {
log.Infof("Your password: %s", conf.C.Sprintf(v.Value))
}
}
}
model.LoadSettings()