refactor: Update user model to use 'any' type for updates and adjust DTO path in configuration

This commit is contained in:
2025-03-10 20:45:41 +00:00
parent d1720ea33d
commit ce39b7ba34
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -454,7 +454,7 @@ func UpdateUser(ctx context.Context, update UserUpdate) (*User, error) {
}
// Update salt and hash directly in the model
if err := tx.Model(user).Updates(map[string]interface{}{
if err := tx.Model(user).Updates(map[string]any{
"salt": pwData.Salt,
"hash": pwData.Hash,
}).Error; err != nil {
@@ -463,7 +463,7 @@ func UpdateUser(ctx context.Context, update UserUpdate) (*User, error) {
}
// Create map for generic update
updates := make(map[string]interface{})
updates := make(map[string]any)
// Add only non-password fields to the update
if update.Email != nil {