Implement new function to Blog for the view

Added Blog::to_json and Blog::get_fqn
This commit is contained in:
Kevin "Ilphrin" Pellet
2018-07-25 21:22:42 +02:00
parent 390d694cac
commit aaae786fb7
2 changed files with 16 additions and 2 deletions
+1 -2
View File
@@ -187,8 +187,7 @@ impl Post {
"author": self.get_authors(conn)[0].to_json(conn),
"url": format!("/~/{}/{}/", blog.actor_id, self.slug),
"date": self.creation_date.timestamp(),
"blog": blog,
"blog_url": format!("/~/{}", blog.actor_id)
"blog": blog.to_json(conn)
})
}