Commit 1bc3b7fe authored by Willard's avatar Willard

Remove api/all endpoint temporarily

parent 78feea0e
......@@ -20,30 +20,6 @@ def cuisines():
data = [{'id': cuisine.id, 'name': cuisine.name} for cuisine in DishCuisine.query.all()]
return jsonify(data)
@app.route('/api/all')
def all():
data = {'update_time': str(datetime.now()), 'dishes': [], 'stalls': [], 'locations': []}
for dish in Dish.query.all():
data['dishes'].append({
'id': dish.id,
'name': dish.name,
'price': dish.price,
'stall_id': dish.stall_id,
'image_path': dish.image_path
})
for stall in Stall.query.all():
data['stalls'].append({
'id': stall.id,
'name': stall.name
})
for loc in Location.query.all():
data['locations'].append({
'id': loc.id,
'name': loc.name
})
return jsonify(**data)
@app.route('/api/search/dish')
def search():
name = request.args.get('name')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment