mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-16 13:05:57 +08:00
🐛 fix: fix some issues (#77)
* 🐛 fix: Incorrect word spelling * ♻️ refactor: split function * 🐛 fix: Delete the disabled channels without deleting the abilities table
This commit is contained in:
@@ -262,6 +262,8 @@ func DeleteChannelByStatus(status int64) (int64, error) {
|
||||
|
||||
func DeleteDisabledChannel() (int64, error) {
|
||||
result := DB.Where("status = ? or status = ?", common.ChannelStatusAutoDisabled, common.ChannelStatusManuallyDisabled).Delete(&Channel{})
|
||||
// 同时删除Ability
|
||||
DB.Where("enabled = ?", false).Delete(&Ability{})
|
||||
return result.RowsAffected, result.Error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user