fix: restore default admin password and add reset flag
Some checks failed
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

Restored 'admin123' as the default password in db init and added a -reset-admin flag to main.go.
This commit is contained in:
2026-03-19 11:22:11 -04:00
parent 45c2d5e643
commit 7d43b2c31b
2 changed files with 18 additions and 2 deletions

View File

@@ -159,7 +159,7 @@ func (db *DB) RunMigrations() error {
}
if count == 0 {
hash, err := bcrypt.GenerateFromPassword([]byte("admin"), 12)
hash, err := bcrypt.GenerateFromPassword([]byte("admin123"), 12)
if err != nil {
return fmt.Errorf("failed to hash default password: %w", err)
}
@@ -167,7 +167,7 @@ func (db *DB) RunMigrations() error {
if err != nil {
return fmt.Errorf("failed to insert default admin: %w", err)
}
log.Println("Created default admin user with password 'admin' (must change on first login)")
log.Println("Created default admin user with password 'admin123' (must change on first login)")
}
// Default client