diff --git a/app/core/config.py b/app/core/config.py index 532a847..5e45ce6 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -111,9 +111,6 @@ class GlobalConfig(ConfigBase): Notify_CompanyWebHookBotUrl = ConfigItem("Notify", "CompanyWebHookBotUrl", "") Update_IfAutoUpdate = ConfigItem("Update", "IfAutoUpdate", False, BoolValidator()) - Update_UpdateType = ConfigItem( - "Update", "UpdateType", "stable", OptionsValidator(["stable", "beta"]) - ) Update_Source = ConfigItem( "Update", "Source", diff --git a/app/models/schema.py b/app/models/schema.py index 26c67bf..9be5bb8 100644 --- a/app/models/schema.py +++ b/app/models/schema.py @@ -140,9 +140,6 @@ class GlobalConfig_Notify(BaseModel): class GlobalConfig_Update(BaseModel): IfAutoUpdate: Optional[bool] = Field(default=None, description="是否自动更新") - UpdateType: Optional[Literal["stable", "beta"]] = Field( - default=None, description="更新类型, stable为稳定版, beta为测试版" - ) Source: Optional[Literal["GitHub", "MirrorChyan", "AutoSite"]] = Field( default=None, description="更新源: GitHub源, Mirror酱源, 自建源" ) diff --git a/app/services/update.py b/app/services/update.py index 10b9d72..cba43f0 100644 --- a/app/services/update.py +++ b/app/services/update.py @@ -71,7 +71,7 @@ class _UpdateHandler: logger.info("开始检查更新") response = requests.get( - f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?user_agent=AutoMasGui¤t_version={current_version}&cdk={Config.get('Update', 'MirrorChyanCDK')}&channel={Config.get('Update', 'UpdateType')}", + f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?user_agent=AutoMasGui¤t_version={current_version}&cdk={Config.get('Update', 'MirrorChyanCDK')}&channel=stable", timeout=10, proxies=Config.get_proxies(), ) diff --git a/frontend/src/api/models/GlobalConfig_Update.ts b/frontend/src/api/models/GlobalConfig_Update.ts index 35f7148..07403fb 100644 --- a/frontend/src/api/models/GlobalConfig_Update.ts +++ b/frontend/src/api/models/GlobalConfig_Update.ts @@ -7,10 +7,6 @@ export type GlobalConfig_Update = { * 是否自动更新 */ IfAutoUpdate?: (boolean | null); - /** - * 更新类型, stable为稳定版, beta为测试版 - */ - UpdateType?: ('stable' | 'beta' | null); /** * 更新源: GitHub源, Mirror酱源, 自建源 */ diff --git a/frontend/src/types/settings.ts b/frontend/src/types/settings.ts index 96989af..c240ec7 100644 --- a/frontend/src/types/settings.ts +++ b/frontend/src/types/settings.ts @@ -31,7 +31,6 @@ export interface SettingsData { } Update: { IfAutoUpdate: boolean - UpdateType: string Source: string ProxyAddress: string MirrorChyanCDK: string