rbac/wwwroot/codes/add_code.dspy

24 lines
371 B
Plaintext
Raw Normal View History

2024-03-12 18:46:05 +08:00
ns = params_kw.copy()
id = uuid()
ns['id'] = id
dbname = get_definition('codesdb')
db = DBPools()
async with db.sqlorContext(dbname) as sor:
r = await sor.C('appcodes', ns)
return {
"widgettype":"Message",
"options":{
"title":"Add Success",
"message":"ok"
}
}
return {
"widgettype":"Error",
"options":{
"title":"Add Error",
"message":"failed"
}
}