瀏覽代碼

remove transaction limit

ming 3 年之前
父節點
當前提交
19ffae3925
共有 1 個文件被更改,包括 5 次插入5 次删除
  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: