def api_post_noso(): current_app.logger.info("New Mobile Call - GET NOSO POST") allposts = Post.query.filter(Post.title.like("%noso%")).order_by( Post.date_posted.desc()).limit(250).all() posts_schema = PostSchema(many=True) result = posts_schema.dump(allposts) return jsonify(result.data)
def api_post_all(): current_app.logger.info("New Mobile Call - GET ALL POST") allposts = Post.query.order_by(Post.date_posted.desc()).limit(250).all() posts_schema = PostSchema(many=True) result = posts_schema.dump(allposts) return jsonify(result.data)