MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / EnableChannelByTag

Function EnableChannelByTag

model/channel.go:622–629  ·  view source on GitHub ↗
(tag string)

Source from the content-addressed store, hash-verified

620}
621
622func EnableChannelByTag(tag string) error {
623 err := DB.Model(&Channel{}).Where("tag = ?", tag).Update("status", common.ChannelStatusEnabled).Error
624 if err != nil {
625 return err
626 }
627 err = UpdateAbilityStatusByTag(tag, true)
628 return err
629}
630
631func DisableChannelByTag(tag string) error {
632 err := DB.Model(&Channel{}).Where("tag = ?", tag).Update("status", common.ChannelStatusManuallyDisabled).Error

Callers 1

EnableTagChannelsFunction · 0.92

Calls 2

UpdateAbilityStatusByTagFunction · 0.85
UpdateMethod · 0.45

Tested by

no test coverage detected