From 96c25f6fba00519c3ffa23efb21cb528b2b7cd88 Mon Sep 17 00:00:00 2001 From: naiba Date: Fri, 5 Nov 2021 14:53:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E9=BB=98=E8=AE=A4=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- model/notification.go | 11 ++++------- service/dao/dao.go | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cb456d3..21ff005 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
LOGO designed by 熊大 .

-    +   

:trollface: 哪吒监控 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,计划任务和在线终端。

diff --git a/model/notification.go b/model/notification.go index 7301f2a..4e04177 100644 --- a/model/notification.go +++ b/model/notification.go @@ -42,17 +42,14 @@ func (n *Notification) reqURL(message string) string { } func (n *Notification) reqMethod() string { - switch n.RequestMethod { - case NotificationRequestMethodGET: - return http.MethodGet - case NotificationRequestMethodPOST: - return http.MethodGet + if n.RequestMethod == NotificationRequestMethodPOST { + return http.MethodPost } - return "" + return http.MethodGet } func (n *Notification) reqBody(message string) (string, error) { - if n.RequestMethod == NotificationRequestMethodGET { + if n.RequestMethod == NotificationRequestMethodGET || message == "" { return "", nil } switch n.RequestType { diff --git a/service/dao/dao.go b/service/dao/dao.go index a1705a8..ef2ab00 100644 --- a/service/dao/dao.go +++ b/service/dao/dao.go @@ -13,7 +13,7 @@ import ( pb "github.com/naiba/nezha/proto" ) -var Version = "v0.11.1" // !!记得修改 README 中的 badge 版本!! +var Version = "v0.11.2" // !!记得修改 README 中的 badge 版本!! var ( Conf *model.Config