v2.4.1
This commit is contained in:
parent
1b029bc09f
commit
b1db7eb3eb
@ -96,7 +96,7 @@ func NewTelegramPushHook() *TelegramPushHook {
|
||||
var cfgData []byte
|
||||
var err error
|
||||
|
||||
cfgData, err = os.ReadFile("../config/config.json")
|
||||
cfgData, err = os.ReadFile("./config/config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -107,8 +107,8 @@ func NewTelegramPushHook() *TelegramPushHook {
|
||||
}
|
||||
|
||||
var pluginConfig *Config
|
||||
if _, err := os.Stat("./telegram_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./telegram_push_config.json")
|
||||
if _, err := os.Stat("./plugins/telegram_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./plugins/telegram_push_config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ func NewWebPushHook() *WebPushHook {
|
||||
var cfgData []byte
|
||||
var err error
|
||||
|
||||
cfgData, err = os.ReadFile("../config/config.json")
|
||||
cfgData, err = os.ReadFile("./config/config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -98,8 +98,8 @@ func NewWebPushHook() *WebPushHook {
|
||||
}
|
||||
|
||||
var pluginConfig *Config
|
||||
if _, err := os.Stat("./web_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./web_push_config.json")
|
||||
if _, err := os.Stat("./plugins/web_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./plugins/web_push_config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ func NewWechatPushHook() *WeChatPushHook {
|
||||
var cfgData []byte
|
||||
var err error
|
||||
|
||||
cfgData, err = os.ReadFile("../config/config.json")
|
||||
cfgData, err = os.ReadFile("./config/config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -135,8 +135,8 @@ func NewWechatPushHook() *WeChatPushHook {
|
||||
}
|
||||
|
||||
var pluginConfig *Config
|
||||
if _, err := os.Stat("./wechat_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./wechat_push_config.json")
|
||||
if _, err := os.Stat("./plugins/wechat_push_config.json"); err == nil {
|
||||
cfgData, err = os.ReadFile("./plugins/wechat_push_config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user