Browse Source

event api : 1對多nft

CJYen 3 năm trước cách đây
mục cha
commit
413bd52754
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      main.py

+ 2 - 0
main.py

@@ -299,6 +299,7 @@ async def nftdrops(userModel : models.NftDrops):
     # input對應
     eventid = '1'
     nftid = '101'
+    nftid2 = '102'
     userid = userModel.userid
     email = userModel.email
 
@@ -306,6 +307,7 @@ async def nftdrops(userModel : models.NftDrops):
     if not table3.find_one(userid=userid):
         # 新增資料
         table3.insert(dict(eventid=eventid, nftid=nftid, userid=userid, email=email))
+        table3.insert(dict(eventid=eventid, nftid=nftid2, userid=userid, email=email))
         db.close()
         return "新增成功"
     # 如果userid存在,回傳通知