MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / DisableTagChannels

Function DisableTagChannels

controller/channel.go:564–585  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

562}
563
564func DisableTagChannels(c *gin.Context) {
565 channelTag := ChannelTag{}
566 err := c.ShouldBindJSON(&channelTag)
567 if err != nil || channelTag.Tag == "" {
568 c.JSON(http.StatusOK, gin.H{
569 "success": false,
570 "message": "参数错误",
571 })
572 return
573 }
574 err = model.DisableChannelByTag(channelTag.Tag)
575 if err != nil {
576 common.ApiError(c, err)
577 return
578 }
579 model.InitChannelCache()
580 c.JSON(http.StatusOK, gin.H{
581 "success": true,
582 "message": "",
583 })
584 return
585}
586
587func EnableTagChannels(c *gin.Context) {
588 channelTag := ChannelTag{}

Callers

nothing calls this directly

Calls 3

DisableChannelByTagFunction · 0.92
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected