24 lines
371 B
Plaintext
24 lines
371 B
Plaintext
|
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"
|
||
|
}
|
||
|
}
|
||
|
|