Fix a simlar bug on blog pages

This commit is contained in:
Bat 2018-07-26 19:10:50 +02:00
parent d4a8808f00
commit ab4af10ce5
1 changed files with 1 additions and 1 deletions

View File

@ -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>>(),