mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
+2
-9
@@ -24,10 +24,7 @@ def addApp(app_id,app_secret,white_list):
|
||||
}
|
||||
return mw.M('app').insert(add_data)
|
||||
|
||||
def getAppList(
|
||||
page:int | None = 1,
|
||||
size:int | None = 10,
|
||||
):
|
||||
def getAppList(page=1,size=10):
|
||||
m = mw.M('app').field(__FIELD)
|
||||
|
||||
start = (int(page) - 1) * (int(size))
|
||||
@@ -53,11 +50,7 @@ def toggleAppStatus(aid):
|
||||
return mw.M('app').where('id=?',(aid,)).update({'status':1})
|
||||
|
||||
|
||||
def setAppData(aid,
|
||||
status: str | None = None,
|
||||
app_id: str | None = None,
|
||||
app_secret: str | None = None,
|
||||
):
|
||||
def setAppData(aid, status=None, app_id=None, app_secret=None):
|
||||
up_data = {}
|
||||
if status is not None:
|
||||
up_data['status'] = status
|
||||
|
||||
@@ -13,8 +13,8 @@ import json
|
||||
import core.mw as mw
|
||||
|
||||
def getOption(name,
|
||||
type: str | None = 'common',
|
||||
default : str | None = None
|
||||
type='common',
|
||||
default=None
|
||||
) -> str:
|
||||
'''
|
||||
获取配置的值
|
||||
@@ -29,8 +29,8 @@ def getOption(name,
|
||||
|
||||
|
||||
def getOptionByJson(name,
|
||||
type: str | None = 'common',
|
||||
default : object | None = None
|
||||
type='common',
|
||||
default=None
|
||||
) -> object:
|
||||
'''
|
||||
获取配置的值,返回对象类型
|
||||
@@ -44,9 +44,7 @@ def getOptionByJson(name,
|
||||
if data is not None:
|
||||
return json.loads(data)
|
||||
|
||||
def setOption(name, value,
|
||||
type: str | None = 'common'
|
||||
) -> bool:
|
||||
def setOption(name, value, type = 'common') -> bool:
|
||||
'''
|
||||
设置配置的值
|
||||
:name -> str 名称 (必填)
|
||||
|
||||
Reference in New Issue
Block a user