add alert api (#458)

This commit is contained in:
UUBulb
2024-10-26 08:16:57 +08:00
committed by GitHub
parent 8c452bdaa9
commit ebc4fad9bc
10 changed files with 278 additions and 78 deletions

View File

@@ -75,11 +75,6 @@ func (ma *memberAPI) delete(c *gin.Context) {
}
delete(singleton.Crons, id)
}
case "alert-rule":
err = singleton.DB.Unscoped().Delete(&model.AlertRule{}, "id = ?", id).Error
if err == nil {
singleton.OnDeleteAlert(id)
}
}
if err != nil {
c.JSON(http.StatusOK, model.Response{