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

Function DeleteChannelBatch

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

Source from the content-addressed store, hash-verified

643}
644
645func DeleteChannelBatch(c *gin.Context) {
646 channelBatch := ChannelBatch{}
647 err := c.ShouldBindJSON(&channelBatch)
648 if err != nil || len(channelBatch.Ids) == 0 {
649 c.JSON(http.StatusOK, gin.H{
650 "success": false,
651 "message": "参数错误",
652 })
653 return
654 }
655 err = model.BatchDeleteChannels(channelBatch.Ids)
656 if err != nil {
657 common.ApiError(c, err)
658 return
659 }
660 model.InitChannelCache()
661 c.JSON(http.StatusOK, gin.H{
662 "success": true,
663 "message": "",
664 "data": len(channelBatch.Ids),
665 })
666 return
667}
668
669type PatchChannel struct {
670 model.Channel

Callers

nothing calls this directly

Calls 3

BatchDeleteChannelsFunction · 0.92
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected