Commit 806e0d66 authored by wanliofficial's avatar wanliofficial

update

parent f33137fd
......@@ -25,10 +25,7 @@ config = dict(
},
TABLE_PREFIX='evm_store_',
MD5_SALT="EhuqUkwV",
<<<<<<< Updated upstream
=======
UPLOAD_SERVER="{}://{}:{}/".format(conf.get('uploads', 'protocol'), conf.get('uploads', 'host'), conf.get('uploads', 'port')),
>>>>>>> Stashed changes
UPLOAD_PATH=os.getcwd(),
UPLOAD_DIR=conf.get('uploads', 'upload_dir'),
TEMPLATE_PATH=os.path.join(os.getcwd(), "static"),
......
......@@ -34,18 +34,14 @@ class AppsManager(object):
def add(self, user, data):
with db_session:
<<<<<<< Updated upstream
editor = User.get(id=user)
=======
if not editor:
return False, "current user is not exists"
result = Apps.get(app_name=data.get("app_name"), is_delete=False)
if result:
return False, "app_name has been exists."
editor = User.get(id=request.current_user.get("id"))
>>>>>>> Stashed changes
if not editor:
return False, "current user is not exists"
data.update({
'create_by': editor,
'create_at': datetime.now(),
......
......@@ -149,8 +149,8 @@ class DownloadManager(object):
down = AppDownload(app=app[0], imei=data.get("imei"))
commit()
if down:
ip = flask_request.remote_addr
update_download_information(ip, down.id)
real_ip = flask_request.headers['X-Forwarded-For']
update_download_information(real_ip, down.id)
return epk_path, "get dictionary {}.".format("success" if epk_path else "no data")
......
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