summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Reeder <colin@vpzom.click>2020-10-15 15:11:28 -0600
committerColin Reeder <colin@vpzom.click>2020-10-15 15:11:28 -0600
commitd4c07fe2134ba53db4e71738b8a039455b730a9d (patch)
tree00a5986bdac898e204c887ab2a4bc8ffc592fad9
parent5fb9f7df6bb1bbdada1f2a0cc69126044d6fb0c7 (diff)
Adapt to renamed field in post API
-rw-r--r--src/resp_types.rs2
-rw-r--r--src/routes/posts.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/resp_types.rs b/src/resp_types.rs
index ec5673e..c8e715e 100644
--- a/src/resp_types.rs
+++ b/src/resp_types.rs
@@ -113,7 +113,7 @@ pub struct RespPostInfo<'a> {
pub approved: bool,
pub score: i64,
#[serde(borrow)]
- pub comments: Vec<RespPostCommentInfo<'a>>,
+ pub replies: Vec<RespPostCommentInfo<'a>>,
pub your_vote: Option<Empty>,
}
diff --git a/src/routes/posts.rs b/src/routes/posts.rs
index ae9ccbf..c2d9f3b 100644
--- a/src/routes/posts.rs
+++ b/src/routes/posts.rs
@@ -196,7 +196,7 @@ async fn page_post_inner(
}
<ul class={"commentList topLevel"}>
{
- post.comments.iter().map(|comment| {
+ post.replies.iter().map(|comment| {
render::rsx! {
<Comment comment={comment} base_data={&base_data} lang={&lang} />
}