(c *gin.Context)
| 801 | } |
| 802 | |
| 803 | func BatchSetChannelTag(c *gin.Context) { |
| 804 | channelBatch := ChannelBatch{} |
| 805 | err := c.ShouldBindJSON(&channelBatch) |
| 806 | if err != nil || len(channelBatch.Ids) == 0 { |
| 807 | c.JSON(http.StatusOK, gin.H{ |
| 808 | "success": false, |
| 809 | "message": "参数错误", |
| 810 | }) |
| 811 | return |
| 812 | } |
| 813 | err = model.BatchSetChannelTag(channelBatch.Ids, channelBatch.Tag) |
| 814 | if err != nil { |
| 815 | common.ApiError(c, err) |
| 816 | return |
| 817 | } |
| 818 | model.InitChannelCache() |
| 819 | c.JSON(http.StatusOK, gin.H{ |
| 820 | "success": true, |
| 821 | "message": "", |
| 822 | "data": len(channelBatch.Ids), |
| 823 | }) |
| 824 | return |
| 825 | } |
| 826 | |
| 827 | func GetTagModels(c *gin.Context) { |
| 828 | tag := c.Query("tag") |
nothing calls this directly
no test coverage detected