fix: id in user-levels update
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
55560071e1
commit
7d77269acf
|
|
@ -130,9 +130,19 @@ func (_i *userLevelsRepository) Update(clientId *uuid.UUID, id uint, userLevels
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
delete(userLevelsMap, "id")
|
||||
|
||||
return _i.DB.DB.Model(&entity.UserLevels{}).
|
||||
Where(&entity.UserLevels{ID: id}).
|
||||
Where("id = ?", id).
|
||||
Updates(userLevelsMap).Error
|
||||
// userLevelsMap, err := utilSvc.StructToMap(userLevels)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// return _i.DB.DB.Model(&entity.UserLevels{}).
|
||||
// Where(&entity.UserLevels{ID: id}).
|
||||
// Updates(userLevelsMap).Error
|
||||
}
|
||||
|
||||
func (_i *userLevelsRepository) Delete(clientId *uuid.UUID, id uint) error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue