def get(self): items = Item.get_items() return { 'items': [{ 'name': item.name, 'price': item.price } for item in items] }
def delete(self): if not Item.get_items(): return {'message': f'There are no items in the store'}, 400 Item.delete_items() return {}, 204