Ver Fonte

remove transaction limit

ming há 3 anos atrás
pai
commit
19ffae3925
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      app/api/api_v1/endpoints/line.py

+ 5 - 5
app/api/api_v1/endpoints/line.py

@@ -20,7 +20,8 @@ from uuid import uuid4
 from sqlalchemy.orm import Session
 from datetime import datetime
 
-
+import pymysql
+pymysql.install_as_MySQLdb()
 
 router = APIRouter()
 
@@ -400,15 +401,14 @@ async def nftdrops(userModel: line.NftDrops):
 
 
 
-@router.get("/transactions/{userid}")
-def transactions(userid,skip: int = 0, limit: int = 100):
+@router.get("/transactions")
+def transactions(skip: int = 0, limit: int = 100):
     # db connect
     db = dataset.connect(
         'mysql://choozmo:pAssw0rd@db.ptt.cx:3306/arkcard?charset=utf8mb4'
     )
-
     sql = 'SELECT * FROM transaction  ' \
-          'WHERE tfrom="'+userid+'" limit '+str(skip)+', '+str(limit)
+          'limit '+str(skip)+', '+str(limit)+''
     result = db.query(sql)
     rows = []
     for row in result: