Fix a simlar bug on blog pages
This commit is contained in:
parent
d4a8808f00
commit
ab4af10ce5
@ -28,7 +28,7 @@ fn paginated_details(name: String, conn: DbConn, user: Option<User>, page: Page)
|
|||||||
let authors = &blog.list_authors(&*conn);
|
let authors = &blog.list_authors(&*conn);
|
||||||
|
|
||||||
Template::render("blogs/details", json!({
|
Template::render("blogs/details", json!({
|
||||||
"blog": &blog,
|
"blog": &blog.to_json(&*conn),
|
||||||
"account": user,
|
"account": user,
|
||||||
"is_author": user.map(|x| x.is_author_in(&*conn, blog.clone())),
|
"is_author": user.map(|x| x.is_author_in(&*conn, blog.clone())),
|
||||||
"posts": posts.into_iter().map(|p| p.to_json(&*conn)).collect::<Vec<serde_json::Value>>(),
|
"posts": posts.into_iter().map(|p| p.to_json(&*conn)).collect::<Vec<serde_json::Value>>(),
|
||||||
|
Loading…
Reference in New Issue
Block a user