mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 13:10:07 +00:00
small improvements (#958)
* small improvements * fix: return empty iterator if no json present * use time.Tick * changes
This commit is contained in:
@@ -70,7 +70,7 @@ func (ns *NotificationServerBundle) reqBody(message string) (string, error) {
|
||||
return string(msgBytes)[1 : len(msgBytes)-1]
|
||||
}), nil
|
||||
case NotificationRequestTypeForm:
|
||||
data, err := utils.GjsonParseStringMap(n.RequestBody)
|
||||
data, err := utils.GjsonIter(n.RequestBody)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func (n *Notification) setRequestHeader(req *http.Request) error {
|
||||
if n.RequestHeader == "" {
|
||||
return nil
|
||||
}
|
||||
m, err := utils.GjsonParseStringMap(n.RequestHeader)
|
||||
m, err := utils.GjsonIter(n.RequestHeader)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user