35 lines
660 B
Plaintext
35 lines
660 B
Plaintext
|
|
ns = params_kw.copy()
|
|
|
|
|
|
|
|
if params_kw.get('adminpwd'):
|
|
ns['adminpwd'] = password_encode(params_kw.get('adminpwd'))
|
|
|
|
|
|
db = DBPools()
|
|
dbname = await rfexe('get_module_dbname', 'cpcc')
|
|
async with db.sqlorContext(dbname) as sor:
|
|
r = await sor.U('cpcnode', 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"
|
|
}
|
|
} |