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

This commit is contained in:
JustSong
2023-10-02 13:06:27 +08:00
parent cbd62011b8
commit 8d34b7a77e
6 changed files with 101 additions and 28 deletions

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
}