def update_user(): if request.is_xhr: user_id = request.args.get('id') update_profile(user_id) return "OK" else: abort(404)