feat: able to delete all manually disabled channels (close #539)

This commit is contained in:
JustSong committed 2023-10-02 13:06:27 +08:00
1 parent 5ad4bcea7f
commit cfd3093b95
6 files changed
+101 -28

No files matched your search

+5
View File
@@ -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
}