DNS添加域名的时候自动同步数据

This commit is contained in:
GoEdgeLab
2020-11-15 12:51:29 +08:00
parent 7eda7098c2
commit 0b6ed761e9
2 changed files with 69 additions and 0 deletions

View File

@@ -1 +1,16 @@
package models
import (
"encoding/json"
"github.com/iwind/TeaGo/maps"
)
// 获取API参数
func (this *DNSProvider) DecodeAPIParams() (maps.Map, error) {
if len(this.ApiParams) == 0 || this.ApiParams == "null" {
return maps.Map{}, nil
}
result := maps.Map{}
err := json.Unmarshal([]byte(this.ApiParams), &result)
return result, err
}