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

Function EnableTagChannels

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

Source from the content-addressed store, hash-verified

585}
586
587func EnableTagChannels(c *gin.Context) {
588 channelTag := ChannelTag{}
589 err := c.ShouldBindJSON(&channelTag)
590 if err != nil || channelTag.Tag == "" {
591 c.JSON(http.StatusOK, gin.H{
592 "success": false,
593 "message": "参数错误",
594 })
595 return
596 }
597 err = model.EnableChannelByTag(channelTag.Tag)
598 if err != nil {
599 common.ApiError(c, err)
600 return
601 }
602 model.InitChannelCache()
603 c.JSON(http.StatusOK, gin.H{
604 "success": true,
605 "message": "",
606 })
607 return
608}
609
610func EditTagChannels(c *gin.Context) {
611 channelTag := ChannelTag{}

Callers

nothing calls this directly

Calls 3

EnableChannelByTagFunction · 0.92
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected