id = params_kw.get('id') if id: db = DBPools() async with db.sqlorContext('iptvdb') as sor: sql = "update iptvchannels set del_flg='1' where id=${id}$" await sor.sqlExe(sql, {'id':id}) return { "widgettype":"Message", "options":{ "timeout":2, "archor":"tc", "title":"Delete success", "message":f"channel[{id=} deleted" } } return { "widgettype":"Error", "options":{ "timeout":2, "archor":"tc", "title":params_kw.get('tv_name'), "height":"80px", "message":f"Delete {id=} failed" } }