+ let parent_id = data.parent_id;
+
+ // If a parent_id is given, fetch the comment to get the path
+ let parent_path = if let Some(parent_id) = parent_id {
+ Some(
+ blocking(context.pool(), move |conn| Comment::read(conn, parent_id))
+ .await??
+ .path,
+ )
+ } else {
+ None
+ };
+
+ let post_id = data.post_id;