diff --git a/web/controllers/api/Member.py b/web/controllers/api/Member.py index eb02a2c..690c527 100644 --- a/web/controllers/api/Member.py +++ b/web/controllers/api/Member.py @@ -169,7 +169,11 @@ def download(filename): if request.method == "GET": if os.path.isfile(os.path.join('static', filename)): return send_from_directory('static', filename, as_attachment=True) - abort(404) + else: # 如果更新包不存在 + return jsonify({ + 'code': 404, + 'msg': '找不到指定版本的安装包' + }) @route_api.route("/member/ruilaizitest",methods = [ "GET","POST" ]) def ruilaizitest():