Skip to content

Commit

Permalink
feat: add show admin's username
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 10, 2022
1 parent 05f19ca commit 4088244
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/password.go → cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ import (

// passwordCmd represents the password command
var passwordCmd = &cobra.Command{
Use: "password",
Short: "Show admin user's password",
Use: "admin",
Aliases: []string{"password"},
Short: "Show admin user's info",
Run: func(cmd *cobra.Command, args []string) {
Init()
admin, err := db.GetAdmin()
if err != nil {
utils.Log.Errorf("failed get admin user: %+v", err)
} else {
utils.Log.Infof("admin user's password is: %s", admin.Password)
utils.Log.Infof("admin user's info: \nusername: %s\npassword: %s", admin.Username, admin.Password)
}
},
}
Expand Down

0 comments on commit 4088244

Please sign in to comment.