def get_posts(): offset = request.args.get("offset", 0, int) limit = request.args.get("limit", 10, int) posts = PostService.get_posts() return jsonify_with_data(APIError.OK, posts=posts)
def get_posts(): offset = request.args.get('offset', 0, int) limit = request.args.get('limit', 10, int) posts = PostService.get_posts() return jsonify_with_data(APIError.OK, posts=posts)
def show_posts(): posts = PostService.get_posts() return render_template('admin/show_posts.html', posts=posts)
def index(): posts = PostService.get_posts() return render_template('web/index.html', posts=posts)