Skip to content

Commit

Permalink
Add special case for admin username
Browse files Browse the repository at this point in the history
  • Loading branch information
svera committed Apr 14, 2024
1 parent 160cc29 commit 32f4f4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/webserver/infrastructure/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ func addUsernames(db *gorm.DB) {
var users []model.User
db.Find(&users, "username = ?", "")
for _, user := range users {
user.Username = user.Uuid
if user.ID == 1 {
user.Username = "admin"
} else {
user.Username = user.Uuid
}
db.Save(&user)
}
}
Expand Down

0 comments on commit 32f4f4d

Please sign in to comment.