(c *gin.Context)
| 562 | } |
| 563 | |
| 564 | func 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 | |
| 587 | func EnableTagChannels(c *gin.Context) { |
| 588 | channelTag := ChannelTag{} |
nothing calls this directly
no test coverage detected