Browse Source

verify Fixed bottle's DB test

Mike Smith 11 năm trước cách đây
mục cha
commit
7886db33cb
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      bottle/app.py

+ 2 - 2
bottle/app.py

@@ -62,9 +62,9 @@ def get_random_world(db):
 @app.route("/dbs")
 def get_random_world_single(db):
     wid = randint(1, 10000)
-    worlds = [db.query(World).get(wid).serialize]
+    world = db.query(World).get(wid).serialize
     response.content_type = 'application/json'
-    return json.dumps(worlds)
+    return json.dumps(world)
   
 @app.route("/dbraw")
 def get_random_world_raw():