(c *gin.Context)
| 521 | } |
| 522 | |
| 523 | func 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 | |
| 539 | func DeleteDisabledChannel(c *gin.Context) { |
| 540 | rows, err := model.DeleteDisabledChannel() |
nothing calls this directly
no test coverage detected