|
@@ -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:
|