Start an actual design

This commit is contained in:
Bat
2018-05-10 21:31:52 +01:00
parent d3319493d9
commit a74215ef07
9 changed files with 165 additions and 39 deletions
+2 -1
View File
@@ -10,10 +10,11 @@ use models::posts::Post;
use models::users::User;
#[get("/~/<_blog>/<slug>/comment")]
fn new(_blog: String, slug: String, _user: User, conn: DbConn) -> Template {
fn new(_blog: String, slug: String, user: User, conn: DbConn) -> Template {
let post = Post::find_by_slug(&*conn, slug).unwrap();
Template::render("comments/new", json!({
"post": post,
"account": user
}))
}