16 lines
274 B
Plaintext
16 lines
274 B
Plaintext
deviceid = params_kw.get('id')
|
|
db = DBPools()
|
|
async with db.sqlorContext('iptvdb') as sor:
|
|
recs = await sor.R('device', {'id':deviceid})
|
|
if len(recs) < 1:
|
|
await sor.C('device', {'id':deviceid})
|
|
return {
|
|
"id":deviceid
|
|
}
|
|
return recs[0]
|
|
|
|
return {
|
|
"id":deviceid
|
|
}
|
|
|