diff --git a/server/hooks/telegram_push/telegram_push.go b/server/hooks/telegram_push/telegram_push.go index 5f0c01e..9224c6d 100644 --- a/server/hooks/telegram_push/telegram_push.go +++ b/server/hooks/telegram_push/telegram_push.go @@ -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) } diff --git a/server/hooks/web_push/web_push.go b/server/hooks/web_push/web_push.go index 6fc0345..44bc39e 100644 --- a/server/hooks/web_push/web_push.go +++ b/server/hooks/web_push/web_push.go @@ -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) } diff --git a/server/hooks/wechat_push/wechat_push.go b/server/hooks/wechat_push/wechat_push.go index 2d3ccf5..ea21a25 100644 --- a/server/hooks/wechat_push/wechat_push.go +++ b/server/hooks/wechat_push/wechat_push.go @@ -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) }