fix thread.js not passing 'since' correctly to post updates api
This commit is contained in:
		@@ -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))))
 | 
			
		||||
 
 | 
			
		||||
@@ -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 => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user