Compare commits

..

No commits in common. "7e218a68a632c72c06902c30eb4aa5cff00f2374" and "990abfb344e63ab0f7cb0e3fa8c9ace71794899b" have entirely different histories.

3 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -39,7 +39,7 @@ where a.id = b.dappid
"options":{ "options":{
"wrap":True, "wrap":True,
"halign":"left", "halign":"left",
"text":f"apikey={password_decode(r.apikey)}" "text":f"apikey={r.apikey}"
} }
}, },
{ {
@ -47,7 +47,7 @@ where a.id = b.dappid
"options":{ "options":{
"wrap":True, "wrap":True,
"halign":"left", "halign":"left",
"text":f"secretkey={password_decode(r.secretkey)}" "text":f"secretkey={r.secretkey}"
} }
} }
] ]

View File

@ -8,7 +8,7 @@ async with db.sqlorContext(dbname) as sor:
"id": params_kw.id, "id": params_kw.id,
"name": params_kw.appname, "name": params_kw.appname,
"description": params_kw.description, "description": params_kw.description,
"secretkey": password_encode(uuid()), "secretkey": uuid(),
"allowedips": params_kw.allowedips, "allowedips": params_kw.allowedips,
"orgid": orgid "orgid": orgid
} }
@ -17,10 +17,10 @@ async with db.sqlorContext(dbname) as sor:
"id": uuid(), "id": uuid(),
"dappid": ns['id'], "dappid": ns['id'],
"userid": userid, "userid": userid,
"apikey": password_encode(uid()), "apikey": uuid(),
"enabled_date": curDateString(), "enabled_date": curDateString(),
"expired_date": '9999-12-31' "expired_date": '9999-12-31'
} }
await sor.C('downapikey', ns1) await sor.C('downapikey', ns1)
return UiMessage(title="create apikey", message=f"apikey created") return UiMessage(title="create apikey", message=f"appid={ns['id']}, apikey={ns1['apikey']}, secretkey={ns['secretkey']}")
return UiError(title='create apikey', message='add apikey error') return UiError(title='create apikey', message='add apikey error')