Commit f33137fd authored by wanliofficial's avatar wanliofficial

Merge branch 'master' of ssh://47.105.117.50:2224/wanli/evm-store

parents 9715568c 2ae53411
...@@ -25,6 +25,10 @@ config = dict( ...@@ -25,6 +25,10 @@ config = dict(
}, },
TABLE_PREFIX='evm_store_', TABLE_PREFIX='evm_store_',
MD5_SALT="EhuqUkwV", 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_PATH=os.getcwd(),
UPLOAD_DIR=conf.get('uploads', 'upload_dir'), UPLOAD_DIR=conf.get('uploads', 'upload_dir'),
TEMPLATE_PATH=os.path.join(os.getcwd(), "static"), TEMPLATE_PATH=os.path.join(os.getcwd(), "static"),
......
...@@ -34,7 +34,15 @@ class AppsManager(object): ...@@ -34,7 +34,15 @@ class AppsManager(object):
def add(self, user, data): def add(self, user, data):
with db_session: with db_session:
<<<<<<< Updated upstream
editor = User.get(id=user) editor = User.get(id=user)
=======
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: if not editor:
return False, "current user is not exists" return False, "current user is not exists"
......
...@@ -15,6 +15,7 @@ class AppDownload(db.Entity): ...@@ -15,6 +15,7 @@ class AppDownload(db.Entity):
uuid = Required(uuid.UUID, unique=True, default=uuid.uuid1, index=True) uuid = Required(uuid.UUID, unique=True, default=uuid.uuid1, index=True)
app = Optional("Apps", reverse="app_download") app = Optional("Apps", reverse="app_download")
imei = Required(str) imei = Required(str)
ip = Optional(str)
address = Optional(str) address = Optional(str)
download_at = Required(datetime, default=datetime.now) download_at = Required(datetime, default=datetime.now)
is_delete = Required(bool, default=False) is_delete = Required(bool, default=False)
......
...@@ -14,6 +14,7 @@ class LoginLogs(db.Entity): ...@@ -14,6 +14,7 @@ class LoginLogs(db.Entity):
id = PrimaryKey(int, auto=True) id = PrimaryKey(int, auto=True)
uuid = Required(uuid.UUID, unique=True, default=uuid.uuid1, index=True) uuid = Required(uuid.UUID, unique=True, default=uuid.uuid1, index=True)
username = Optional(str) username = Optional(str)
ip = Optional(str)
address = Optional(str) address = Optional(str)
create_at = Required(datetime, default=datetime.now) create_at = Required(datetime, default=datetime.now)
create_by = Optional("User", reverse='login_logs_creater') create_by = Optional("User", reverse='login_logs_creater')
......
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