def update_user(user): try: user = User(user) except KeyError: abort(404) user.update(request.form.get('email'), request.form.get('permissions')) return jsonify(**user.json())
def add_availability(user): try: user = User(user) except KeyError: abort(404) user.add_availability(request.form.get("day"), request.form.get("start"), request.form.get("type")) return jsonify(**user.json())
def view_user(user): try: user = User(user) except KeyError: abort(404) return jsonify(**user.json())