def remove_availability(user): try: user = User(user) except KeyError: abort(404) user.remove_availability() return jsonify(user.get_availability())
def view_availability(user): try: user = User(user) except KeyError: abort(404) return jsonify(user.get_availability())