mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-04 06:16:35 +08:00
waf/ip名单有变更立即发送通知
This commit is contained in:
@@ -46,9 +46,15 @@ func (this *IPItemDAO) EnableIPItem(id int64) error {
|
||||
|
||||
// 禁用条目
|
||||
func (this *IPItemDAO) DisableIPItem(id int64) error {
|
||||
_, err := this.Query().
|
||||
version, err := SharedIPListDAO.IncreaseVersion()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = this.Query().
|
||||
Pk(id).
|
||||
Set("state", IPItemStateDisabled).
|
||||
Set("version", version).
|
||||
Update()
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user