Procházet zdrojové kódy

modify json format

ming před 3 roky
rodič
revize
16086d8f28
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. 2 4
      app/api/api_v1/endpoints/line.py

+ 2 - 4
app/api/api_v1/endpoints/line.py

@@ -410,11 +410,9 @@ def transactions(userid,skip: int = 0, limit: int = 100):
     sql = 'SELECT * FROM transaction  ' \
           'WHERE tfrom="'+userid+'" limit '+str(skip)+', '+str(limit)
     result = db.query(sql)
-    rows = {}
-    i = 0
+    rows = []
     for row in result:
-        rows[i] = row
-        i += 1
+        rows.append(row)
     db.close()
     
     return rows