~sircmpwn/hnstats

cec4122cfd79044dadda4284232e25930f295d97 — Drew DeVault 6 years ago b7c5187
Add int() conversion to paged results
1 files changed, 2 insertions(+), 2 deletions(-)

M app.py
M app.py => app.py +2 -2
@@ 52,7 52,7 @@ def post_json(post_id):

@app.route("/title-changes")
def title_changes():
    start = (request.args.get("start") or 0) * 25
    start = int(request.args.get("start") or 0) * 25
    results = TitleChange.query\
            .order_by(TitleChange.id.desc()) \
            .offset(start) \


@@ 66,7 66,7 @@ def title_changes():

@app.route("/deleted-10")
def deleted_10():
    start = (request.args.get("start") or 0) * 25
    start = int(request.args.get("start") or 0) * 25
    results = Article.query\
            .filter(Article.status != ArticleStatus.alive) \
            .filter(Article.score >= 10) \