Your Name 3 tahun lalu
induk
melakukan
0b41b0a1f9
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      step_question/apis/main.py

+ 1 - 1
step_question/apis/main.py

@@ -213,7 +213,7 @@ async def coffee_set(item_id: int):
 @app.post("/v_lst")
 async def v_lst():
     db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/hhh?charset=utf8mb4')
-    cursor=db.query('SELECT id,email,name,phone,h_class,loc,type,size,time_stamp FROM hhh.deco_request;')
+    cursor=db.query('SELECT id,email,name,phone,h_class,loc,type,size,time_stamp FROM hhh.deco_request order by id desc;')
     result=[]
     for c in cursor:
         result.append({"id":c['id'],'email':c['email'],"name":c['name'],"phone":c['phone'],"loc":c['loc'],"h_class":c['h_class'],"type":c['type'],"size":c['size'],"create_time":c['time_stamp']})