'wip(semantic):调整模板api接口'

This commit is contained in:
zhengxinonly
2021-09-12 18:16:02 +08:00
parent b9c449ad57
commit 550f99e468
30 changed files with 259 additions and 240 deletions
+6 -2
View File
@@ -27,7 +27,9 @@ def login_log():
page=page, per_page=limit, error_out=False)
data = marshal(log_paginate.items, log_fields)
return table_api(data=data, count=log_paginate.total, code=0)
return table_api(result={'items': data,
'total': log_paginate.total, },
code=0)
@logs_bp.get('/access_log')
@@ -40,4 +42,6 @@ def operate_log():
desc(LoggingModel.create_at)).paginate(
page=page, per_page=limit, error_out=False)
data = marshal(log_paginate.items, log_fields)
return table_api(data=data, count=log_paginate.total, code=0)
return table_api(result={'items': data,
'total': log_paginate.total, },
code=0)
+1 -1
View File
@@ -21,7 +21,7 @@ def get_captcha():
def logout():
logout_user()
session.pop('permissions')
return success_api(msg="注销成功")
return success_api(message="注销成功")
@index_bp.get('/passport/login')