What if I use the correct name for the this field?

Fix #81
This commit is contained in:
Bat
2018-06-27 20:43:09 +02:00
parent 68a041711c
commit 1a2cf3b14f
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,7 @@ use plume_models::{
};
use inbox::Inbox;
#[derive(FromForm)]
#[derive(FromForm, Debug)]
struct NewCommentForm {
pub responding_to: Option<i32>,
pub content: String
@@ -26,6 +26,7 @@ fn create(blog_name: String, slug: String, data: LenientForm<NewCommentForm>, us
let blog = Blog::find_by_fqn(&*conn, blog_name.clone()).unwrap();
let post = Post::find_by_slug(&*conn, slug.clone(), blog.id).unwrap();
let form = data.get();
println!("form: {:?}", form);
let (new_comment, id) = NewComment::build()
.content(form.content.clone())