Compare commits
No commits in common. "ccc3233bf239bdf557adfb1a02968e75793da9b2" and "35256dca0cfa42208c2b9b0c0a0628e8a39dc7a0" have entirely different histories.
ccc3233bf2
...
35256dca0c
@ -1,24 +0,0 @@
|
|||||||
debug(f'{params_kw=}')
|
|
||||||
dbname = get_module_dbname()
|
|
||||||
db = DBPools()
|
|
||||||
async with db.sqlorContext(dbname) as sor:
|
|
||||||
orgid = await get_userorgid()
|
|
||||||
userid = await get_user()
|
|
||||||
ns = {
|
|
||||||
"id": uuid(),
|
|
||||||
"name": params_kw.name,
|
|
||||||
"description": params_kw.description,
|
|
||||||
"secretkey": uuid(),
|
|
||||||
"allowedips": params_kw.allowips,
|
|
||||||
"orgid": orgid
|
|
||||||
}
|
|
||||||
await sor.C('downapp', ns)
|
|
||||||
ns1 = {
|
|
||||||
"id": uuid()
|
|
||||||
"dappid": ns['id'],
|
|
||||||
"userid": userid,
|
|
||||||
"apikey": uuid(),
|
|
||||||
"enabled_date": curDateString(),
|
|
||||||
"expired_date": '9999-12-31'
|
|
||||||
}
|
|
||||||
await sor.C('downapikey', ns1)
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"widgettype":"Form",
|
|
||||||
"options":{
|
|
||||||
"title":"创建用户apikey",
|
|
||||||
"dscription":"下位系统要免密登录本系统,需要设置apikey和secretkey",
|
|
||||||
"field":[
|
|
||||||
{
|
|
||||||
"name":"appname",
|
|
||||||
"label":"应用名",
|
|
||||||
"uitype":"str",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"description",
|
|
||||||
"label":"应用描述",
|
|
||||||
"uitype":"str"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name":"allowedips",
|
|
||||||
"label":"允许的IP集",
|
|
||||||
"uitype":"str"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"binds":[
|
|
||||||
{
|
|
||||||
"wid":"self",
|
|
||||||
"evnet":"submit",
|
|
||||||
"actiontype":"urlwidget",
|
|
||||||
"target":"self",
|
|
||||||
"options":{
|
|
||||||
"url":"{{entire_url('./create_apikey.dspy')}}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user