2024-03-19 18:17:38 +08:00
|
|
|
print(params_kw, 'update_code.dspy')
|
2024-03-19 15:09:58 +08:00
|
|
|
ns = params_kw.copy()
|
|
|
|
dbname = get_definition('codesdb')
|
|
|
|
db = DBPools()
|
|
|
|
async with db.sqlorContext(dbname) as sor:
|
2024-03-19 18:17:38 +08:00
|
|
|
r = await sor.U('appcodes', ns)
|
2024-03-19 15:09:58 +08:00
|
|
|
print('update success');
|
|
|
|
return {
|
|
|
|
"widgettype":"Message",
|
|
|
|
"options":{
|
|
|
|
"title":"Update Success",
|
|
|
|
"message":"ok"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print('update failed');
|
|
|
|
return {
|
|
|
|
"widgettype":"Error",
|
|
|
|
"options":{
|
|
|
|
"title":"Update Error",
|
|
|
|
"message":"failed"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|