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

Function DeleteChannel

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

Source from the content-addressed store, hash-verified

521}
522
523func DeleteChannel(c *gin.Context) {
524 id, _ := strconv.Atoi(c.Param("id"))
525 channel := model.Channel{Id: id}
526 err := channel.Delete()
527 if err != nil {
528 common.ApiError(c, err)
529 return
530 }
531 model.InitChannelCache()
532 c.JSON(http.StatusOK, gin.H{
533 "success": true,
534 "message": "",
535 })
536 return
537}
538
539func DeleteDisabledChannel(c *gin.Context) {
540 rows, err := model.DeleteDisabledChannel()

Callers

nothing calls this directly

Calls 3

DeleteMethod · 0.95
ApiErrorFunction · 0.92
InitChannelCacheFunction · 0.92

Tested by

no test coverage detected