mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-31 07:26:44 +00:00
fix 插件API安全控制
This commit is contained in:
@@ -32,7 +32,7 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "cloudflare.jpg"
|
||||
# 插件版本
|
||||
plugin_version = "1.1"
|
||||
plugin_version = "1.2"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -750,10 +750,12 @@ class CloudflareSpeedTest(_PluginBase):
|
||||
def get_page(self) -> List[dict]:
|
||||
pass
|
||||
|
||||
def cloudflare_speedtest(self) -> schemas.Response:
|
||||
def cloudflare_speedtest(self, apikey: str) -> schemas.Response:
|
||||
"""
|
||||
API调用CloudflareSpeedTest IP优选
|
||||
"""
|
||||
if apikey != settings.API_TOKEN:
|
||||
return schemas.Response(success=False, message="API密钥错误")
|
||||
self.__cloudflareSpeedTest()
|
||||
return schemas.Response(success=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user