cpcc/wwwroot/components/update_components.dspy
2025-07-16 14:32:09 +08:00

32 lines
568 B
Plaintext

ns = params_kw.copy()
db = DBPools()
dbname = await rfexe('get_module_dbname', 'cpcc')
async with db.sqlorContext(dbname) as sor:
r = await sor.U('components', ns)
debug('update success');
return {
"widgettype":"Message",
"options":{
"title":"Update Success",
"cwidth":16,
"cheight":9,
"timeout":3,
"message":"ok"
}
}
return {
"widgettype":"Error",
"options":{
"title":"Update Error",
"cwidth":16,
"cheight":9,
"timeout":3,
"message":"failed"
}
}