feat: able to delete all manually disabled channels (close #539)
This commit is contained in:
1 parent
5ad4bcea7f
commit
cfd3093b95
6 files changed
+101
-28
No files matched your search
@@ -176,3 +176,8 @@ func updateChannelUsedQuota(id int, quota int) {
|
||||
common.SysError("failed to update channel used quota: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func DeleteChannelByStatus(status int64) (int64, error) {
|
||||
result := DB.Where("status = ?", status).Delete(&Channel{})
|
||||
return result.RowsAffected, result.Error
|
||||
}
|
||||
Reference in new issue
Block a user