This commit is contained in:
2023-11-23 23:28:19 +08:00
parent 12c6c1a649
commit e497407d0b

View File

@@ -153,11 +153,9 @@ def loginmiya():
@route_api.route("/member/ruilaizi/<filename>",methods = [ "GET" ]) @route_api.route("/member/ruilaizi/<filename>",methods = [ "GET" ])
def ruilaizi(filename): def ruilaizi(filename):
# version = request.args.get('version', type=str) # 获取要下载的版本号 if request.method == "GET":
package_path = '/static/app.apk' # 假设更新包存放在 /path/to/update/package 目录下 if os.path.isfile(os.path.join('static', filename)):
if os.path.exists(package_path): # 如果更新包存在 return send_from_directory('static', filename, as_attachment=True)
app.logger.info(token)
return send_from_directory(directory='static', filename=filename, as_attachment=True)
else: # 如果更新包不存在 else: # 如果更新包不存在
return jsonify({ return jsonify({
'code': 404, 'code': 404,