From 8ac057a70f64c458a2f5c02bb862626b49300fb2 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 24 May 2024 09:23:15 -0400 Subject: [PATCH] Add comment. --- crates/api_crud/src/comment/create.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/api_crud/src/comment/create.rs b/crates/api_crud/src/comment/create.rs index 94ddb9ea3..2efd46964 100644 --- a/crates/api_crud/src/comment/create.rs +++ b/crates/api_crud/src/comment/create.rs @@ -51,6 +51,8 @@ pub async fn create_comment( // Check for a community ban let post_id = data.post_id; + + // Read the full post view in order to get the comments count. let post_view = PostView::read( &mut context.pool(), post_id,