feat: support disable version check

This commit is contained in:
John Wang 2023-05-23 17:34:03 +08:00
parent 056898bf21
commit 0180d9ea4f
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,14 @@ class VersionApi(Resource):
args = parser.parse_args()
check_update_url = current_app.config['CHECK_UPDATE_URL']
if not check_update_url:
return {
'version': '0.0.0',
'release_date': '',
'release_notes': '',
'can_auto_update': False
}
try:
response = requests.get(check_update_url, {
'current_version': args.get('current_version')