feat: able to delete all manually disabled channels (close #539)

This commit is contained in:
JustSong
2023-10-02 13:06:27 +08:00
parent cbd62011b8
commit 8d34b7a77e
6 changed files with 101 additions and 28 deletions

View File

@@ -127,6 +127,23 @@ func DeleteChannel(c *gin.Context) {
return
}
func DeleteManuallyDisabledChannel(c *gin.Context) {
rows, err := model.DeleteChannelByStatus(common.ChannelStatusManuallyDisabled)
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": err.Error(),
})
return
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"message": "",
"data": rows,
})
return
}
func UpdateChannel(c *gin.Context) {
channel := model.Channel{}
err := c.ShouldBindJSON(&channel)