def add_santa(): santa_type = request.args santa_dao = SantaDAO(postgresql) santa_name = request.form["name"] santa_index = request.form["index"] santa_address = request.form["address"] santa_email = request.form["email"] santa_dict = {'name': santa_name, 'index': santa_index, 'address': santa_address, 'email': santa_email} santa_dao.put_santa(santa_dict) return jsonify(santa_dict), 200
def get_stats(): santa_dao = SantaDAO(postgresql) stats = santa_dao.get_stats() return jsonify(stats), 200