Skip to content

Commit

Permalink
🐛 hot fix deactivate unread delete
Browse files Browse the repository at this point in the history
  • Loading branch information
pikachu0310 committed Sep 30, 2024
1 parent b409457 commit bd3de4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions repository/gorm/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,11 @@ func (r *userRepository) UpdateUser(id uuid.UUID, args repository.UpdateUserArgs
count += len(changes)
}
// 凍結の際は未読を削除
if deactivate {
if err := tx.Delete(&model.Unread{}, "user_id = ?", id).Error; err != nil {
return err
}
}
// if deactivate {
// if err := tx.Delete(&model.Unread{}, "user_id = ?", id).Error; err != nil {
// return err
// }
// }
return nil
})
if err != nil {
Expand Down

0 comments on commit bd3de4f

Please sign in to comment.