def user_post_list(username): user = User.query.filter(User.username == username).first() if not user: return abort(404) result = posts_schema.dump(user.posts) return jsonify(posts=result.data)
def my_post_list(): user = request.oauth.user result = posts_schema.dump(user.posts) return jsonify(posts=result.data)