rewrite threads routes to include id

This commit is contained in:
2026-04-20 13:22:41 +03:00
parent a2ceaa0966
commit 7eafcde1d7
6 changed files with 29 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ def get_post_url(post_id, _anchor=False, external=False):
anchor = None if not _anchor else f'post-{post_id}'
return url_for('threads.thread', slug=thread.slug, after=post_id, _external=external, _anchor=anchor)
return url_for('threads.thread_by_id', thread_id=thread.id, after=post_id, _external=external, _anchor=anchor)
def dict_to_query_string(d) -> str:
return '?' + '&'.join([f'{key}={str(value)}' for key, value in d.items()])