fix 插件API安全控制

This commit is contained in:
jxxghp
2024-04-25 18:00:31 +08:00
parent 827007fe24
commit b367d1a4f6
25 changed files with 219 additions and 183 deletions

View File

@@ -1,11 +1,10 @@
from urllib.parse import urlencode
from typing import Any, List, Dict, Tuple
from app.plugins import _PluginBase
from app.core.event import eventmanager, Event
from app.log import logger
from app.plugins import _PluginBase
from app.schemas.types import EventType, NotificationType
from app.utils.http import RequestUtils
from typing import Any, List, Dict, Tuple
from app.log import logger
class PushPlusMsg(_PluginBase):
@@ -179,7 +178,7 @@ class PushPlusMsg(_PluginBase):
"title": title,
"content": text,
"template": "txt",
"channel":"wechat"
"channel": "wechat"
}
res = RequestUtils(content_type="application/json").post_res(sc_url, json=event_info)
if res and res.status_code == 200: