编辑owner

This commit is contained in:
wuaho 2021-11-30 15:15:22 +08:00
parent 47c62fd634
commit 6c605483fd

View File

@ -300,6 +300,14 @@ async def account_owner_list(request: Request,
"comparator": "in",
"ftv": data_in.owners
}
if not data_in.owners[0]:
res = await crud.user.update_one(db, {'name': data_in.account_name,
f'data_where.{game}': {'$exists': True}
},
{'$pull': {f'data_where.{game}': {'columnName': 'owner_name'}}}
)
return schemas.Msg(code=0, msg='ok', data=res.raw_result)
is_exists = await crud.user.find_one(db, {'name': data_in.account_name,
f'data_where.{game}': {'$exists': True},
})