(c *gin.Context)
| 585 | } |
| 586 | |
| 587 | func 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 | |
| 610 | func EditTagChannels(c *gin.Context) { |
| 611 | channelTag := ChannelTag{} |
nothing calls this directly
no test coverage detected