25 lines
439 B
Plaintext
25 lines
439 B
Plaintext
|
print(params_kw, 'update_kv.dspy')
|
||
|
ns = params_kw.copy()
|
||
|
dbname = get_definition('codesdb')
|
||
|
db = DBPools()
|
||
|
async with db.sqlorContext(dbname) as sor:
|
||
|
r = await sor.U('appcodes_kv', ns)
|
||
|
print('update success');
|
||
|
return {
|
||
|
"widgettype":"Message",
|
||
|
"options":{
|
||
|
"title":"Update Success",
|
||
|
"message":"ok"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
print('update failed');
|
||
|
return {
|
||
|
"widgettype":"Error",
|
||
|
"options":{
|
||
|
"title":"Update Error",
|
||
|
"message":"failed"
|
||
|
}
|
||
|
}
|
||
|
|