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

Function BatchSetChannelTag

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

Source from the content-addressed store, hash-verified

801}
802
803func 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
827func GetTagModels(c *gin.Context) {
828 tag := c.Query("tag")

Callers

nothing calls this directly

Calls 3

BatchSetChannelTagFunction · 0.92
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected