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

Function EditTagChannels

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

Source from the content-addressed store, hash-verified

608}
609
610func EditTagChannels(c *gin.Context) {
611 channelTag := ChannelTag{}
612 err := c.ShouldBindJSON(&channelTag)
613 if err != nil {
614 c.JSON(http.StatusOK, gin.H{
615 "success": false,
616 "message": "参数错误",
617 })
618 return
619 }
620 if channelTag.Tag == "" {
621 c.JSON(http.StatusOK, gin.H{
622 "success": false,
623 "message": "tag不能为空",
624 })
625 return
626 }
627 err = model.EditChannelByTag(channelTag.Tag, channelTag.NewTag, channelTag.ModelMapping, channelTag.Models, channelTag.Groups, channelTag.Priority, channelTag.Weight)
628 if err != nil {
629 common.ApiError(c, err)
630 return
631 }
632 model.InitChannelCache()
633 c.JSON(http.StatusOK, gin.H{
634 "success": true,
635 "message": "",
636 })
637 return
638}
639
640type ChannelBatch struct {
641 Ids []int `json:"ids"`

Callers

nothing calls this directly

Calls 3

EditChannelByTagFunction · 0.92
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected