rbac/wwwroot/codes/delete_kv.dspy
2024-03-19 15:09:58 +08:00

29 lines
467 B
Plaintext

print(params_kw, 'delete_code.dspy')
ns = {
'id':params_kw['id'],
'del_flg':'1'
}
dbname = get_definition('codesdb')
db = DBPools()
async with db.sqlorContext(dbname) as sor:
r = await sor.U('appcodes_kv', ns)
print('delete success');
return {
"widgettype":"Message",
"options":{
"title":"Delete Success",
"message":"ok"
}
}
print('Delete failed');
return {
"widgettype":"Error",
"options":{
"title":"Delete Error",
"message":"failed"
}
}