Pārlūkot izejas kodu

修改接口请求方式为GET

lijian 6 gadi atpakaļ
vecāks
revīzija
24e6dde486
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      services/knowoapi/controllers/alert.go

+ 1 - 1
services/knowoapi/controllers/alert.go

@@ -120,7 +120,7 @@ func (a *AlertController) Get() {
 
 // BeforeActivation inside router
 func (a *AlertController) BeforeActivation(b mvc.BeforeActivation) {
-	b.Handle("POST", "/status/{alertid:int}/{status:int}", "SetStatus")
+	b.Handle("GET", "/status/{alertid:int}/{status:int}", "SetStatus") //设置启用、禁用状态
 }
 
 // SetStatus set rule status