From b1db7eb3eb9213425175c2174ba6f655787a12a0 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Mon, 4 Mar 2024 10:52:19 +0800 Subject: [PATCH] v2.4.1 --- server/hooks/telegram_push/telegram_push.go | 6 +++--- server/hooks/web_push/web_push.go | 6 +++--- server/hooks/wechat_push/wechat_push.go | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/hooks/telegram_push/telegram_push.go b/server/hooks/telegram_push/telegram_push.go index 5f0c01e9..9224c6d6 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 6fc03457..44bc39ed 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 2d3ccf56..ea21a25b 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) }