From 3c3837b3f25075a171ba22b443a969b3442b325f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Wed, 2 Jul 2025 13:34:45 +0300 Subject: [PATCH] fix thread.js not passing 'since' correctly to post updates api --- app/routes/threads.py | 1 - data/static/js/thread.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/routes/threads.py b/app/routes/threads.py index cd7249e..cb938ca 100644 --- a/app/routes/threads.py +++ b/app/routes/threads.py @@ -31,7 +31,6 @@ def thread(slug): ("thread_id", "=", thread.id), ("id", "<=", after_id), ]) - print(post_position) page = math.ceil((post_position) / POSTS_PER_PAGE) else: page = max(1, min(page_count, int(request.args.get("page", default = 1)))) diff --git a/data/static/js/thread.js b/data/static/js/thread.js index 0679b74..1884f58 100644 --- a/data/static/js/thread.js +++ b/data/static/js/thread.js @@ -64,7 +64,7 @@ function tryFetchUpdate() { if (!threadEndpoint) return; - const body = JSON.stringify({since: now}); + const body = JSON.stringify({'since': now}); fetch(threadEndpoint, {method: "POST", headers: {"Content-Type": "application/json"}, body: body}) .then(res => res.json()) .then(json => {