Comment posting is idempotent + tests

This commit is contained in:
Alphonse Paix
2025-10-05 15:01:57 +02:00
parent 8f62c2513e
commit d96a29ee73
15 changed files with 289 additions and 95 deletions

View File

@@ -151,9 +151,11 @@ pub async fn see_post(
let comments = get_comments_page_for_post(&connection_pool, post_id, 1)
.await
.context("Failed to fetch latest comments")?;
let idempotency_key = Uuid::new_v4().to_string();
let template = HtmlTemplate(PostTemplate {
post,
comments,
idempotency_key,
current_page,
max_page,
comments_count,