fix(subscribe): update delete method to use Where clause for improved query accuracy

This commit is contained in:
Chang lue Tsen 2025-08-18 02:09:15 -04:00
parent 245f347d22
commit 3bb83edf05

View File

@ -55,7 +55,7 @@ func (m *DefaultSubscribeApplicationModel) Update(ctx context.Context, data *Sub
}
func (m *DefaultSubscribeApplicationModel) Delete(ctx context.Context, id int64) error {
if err := m.WithContext(ctx).Delete(&SubscribeApplication{}, id).Error; err != nil {
if err := m.WithContext(ctx).Where("`id` = ?", id).Delete(&SubscribeApplication{}).Error; err != nil {
return err
}
return nil