fix(subscribe): update delete method to use Where clause for improved query accuracy
This commit is contained in:
parent
245f347d22
commit
3bb83edf05
@ -55,7 +55,7 @@ func (m *DefaultSubscribeApplicationModel) Update(ctx context.Context, data *Sub
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *DefaultSubscribeApplicationModel) Delete(ctx context.Context, id int64) error {
|
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 err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user