Example #1
0
 def handle(self):
     price = int(self.request.get("price"))
     if not price:
         return {"success": False, "error": "price parameter not found"}
     table = Table.get(price).to_dict_with_seats()
     if not table:
         return {"success": False, "error": "table not found"}
     return {"success":True, "table": table}
Example #2
0
 def handle(self):
     price = int(self.request.get("price"))
     if not price:
         return {"success": False, "error": "price parameter not found"}
     table = Table.get(price).to_dict_with_seats()
     if not table:
         return {"success": False, "error": "table not found"}
     return {"success": True, "table": table}