Skip to content

Commit

Permalink
fix(dna): display latest comment update
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyg committed Feb 10, 2023
1 parent 16ac910 commit d6dc591
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions dnas/herd/zomes/coordinator/posts/src/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,15 @@ pub fn get_comment_metadata(
.len();

// get actual comment
let maybe_record = get(original_action_hash.clone(), GetOptions::default())?;
let record = get_latest_record(original_action_hash.clone())?;

match maybe_record {
Some(record) => {
let comment_metadata = CommentMetadata {
record: record,
upvotes: upvotes,
downvotes: downvotes,
};
let comment_metadata = CommentMetadata {
record: record,
upvotes: upvotes,
downvotes: downvotes,
};

Ok(comment_metadata)
},
None => Err(wasm_error!(WasmErrorInner::Guest("Failed to get record".into())))
}
Ok(comment_metadata)

}

Expand Down

0 comments on commit d6dc591

Please sign in to comment.