Comment posting is idempotent + tests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user