mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 12:16:24 +08:00
fix(user): show admin password on first start (#883)
* fix: fix admin password not shown in first start * chore: add time dependence Co-authored-by: Yinan Qin <39023210+elysia-best@users.noreply.github.com> Signed-off-by: ILoveScratch <ilovescratch@foxmail.com> * fix: fix log format Co-authored-by: Yinan Qin <39023210+elysia-best@users.noreply.github.com> Signed-off-by: ILoveScratch <ilovescratch@foxmail.com> --------- Signed-off-by: ILoveScratch <ilovescratch@foxmail.com> Co-authored-by: Yinan Qin <39023210+elysia-best@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package data
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"os"
|
||||
|
||||
"github.com/OpenListTeam/OpenList/v4/cmd/flags"
|
||||
@ -39,6 +41,7 @@ func initUser() {
|
||||
panic(err)
|
||||
} else {
|
||||
utils.Log.Infof("Successfully created the admin user and the initial password is: %s", adminPassword)
|
||||
fmt.Printf("\033[36mINFO\033[39m[%s] Successfully created the admin user and the initial password is: %s\n", time.Now().Format("2006-01-02 15:04:05"), adminPassword)
|
||||
}
|
||||
} else {
|
||||
utils.Log.Fatalf("[init user] Failed to get admin user: %v", err)
|
||||
|
Reference in New Issue
Block a user