fix thread.js not passing 'since' correctly to post updates api

This commit is contained in:
Lera Elvoé 2025-07-02 13:34:45 +03:00
parent 57a6810b03
commit 3c3837b3f2
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc
2 changed files with 1 additions and 2 deletions

View File

@ -31,7 +31,6 @@ def thread(slug):
("thread_id", "=", thread.id), ("thread_id", "=", thread.id),
("id", "<=", after_id), ("id", "<=", after_id),
]) ])
print(post_position)
page = math.ceil((post_position) / POSTS_PER_PAGE) page = math.ceil((post_position) / POSTS_PER_PAGE)
else: else:
page = max(1, min(page_count, int(request.args.get("page", default = 1)))) page = max(1, min(page_count, int(request.args.get("page", default = 1))))

View File

@ -64,7 +64,7 @@
function tryFetchUpdate() { function tryFetchUpdate() {
if (!threadEndpoint) return; 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}) fetch(threadEndpoint, {method: "POST", headers: {"Content-Type": "application/json"}, body: body})
.then(res => res.json()) .then(res => res.json())
.then(json => { .then(json => {