Commit 983e6b68 authored by wanli's avatar wanli

update

parent fc852ace
......@@ -130,9 +130,9 @@ class DownloadManager(object):
if not app:
return False, "app not found"
else:
app = Apps.select(app_name=data.get("id")).order_by(desc(Apps.create_at))
app = Apps.select(app_name=data.get("name")).order_by(desc(Apps.create_at))
if len(app) > 1:
app = Apps.select(lambda p: p.app_name == data.get("id") and p.create_by.account == 'evm').order_by(desc(Apps.create_at)).first()
app = Apps.select(lambda p: p.app_name == data.get("name") and p.create_by.account == 'evm').order_by(desc(Apps.create_at)).first()
if not app:
return False, "app not found"
......
'''
Author: your name
Date: 2021-04-14 14:12:18
LastEditTime: 2021-07-13 15:13:19
LastEditTime: 2021-07-14 12:42:49
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \evm-store\backend\schema\download.py
......
......@@ -48,10 +48,16 @@ def delete(id):
@download_api.route("/apps", methods=["POST"])
@validate_schema(DownloadSchema)
# @validate_schema(DownloadSchema)
def get():
try:
data = request.schema_data
if not request.json:
return response_result(ResponseCode.INVAILD_REQUEST)
data = request.json
if not data.get("uuid") and not data.get("imei"):
return response_result(ResponseCode.PARAMETER_ERROR)
data.update({ 'real_ip': request.headers.get('X-Forwarded-For', '127.0.0.1') })
result, message = signalManager.actionGetDownload.emit(data)
# 读取epk文件,按照格式返回相应结构体数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment