add idm and chip_id fields to card table
This commit is contained in:
1 parent
ca9ccbe8a3
commit
3979a020a6
6 files changed
+140
-22
No files matched your search
@@ -83,6 +83,10 @@ class SaoBase:
|
||||
if not user_id:
|
||||
user_id = await self.data.user.create_user() #works
|
||||
card_id = await self.data.card.create_card(user_id, req.access_code)
|
||||
if req.access_code.startswith("5"):
|
||||
await self.data.card.set_idm_by_access_code(card_id, req.chip_id[:16])
|
||||
elif req.access_code.startswith("010") or req.access_code.startswith("3"):
|
||||
await self.data.card.set_chip_id_by_access_code(card_id, int(req.chip_id[:8], 16))
|
||||
|
||||
if card_id is None:
|
||||
user_id = -1
|
||||
|
||||
Reference in new issue
Block a user