rbac/www/user/register.dspy
2025-01-16 17:53:23 +08:00

15 lines
471 B
Plaintext

debug(f'{params_kw=}')
db = DBPools()
dbname = await rfexe('get_module_dbname', 'sage')
async with db.sqlorContext(dbname) as sor:
orgid = await register_user(sor, params_kw)
try:
ownerid = await get_owner_orgid(sor, orgid)
await openCustomerAccounts(sor, ownerid, orgid)
except Exception as e:
fe = format_exc()
exception(f'{e=}\n{fe}')
return UiMessage(title="Success", message="register success")
return UiError(title='Error', message="register failed")