feat(handlers): Extract & add author to thread and post information

This commit is contained in:
Vincent Ambo 2018-04-09 09:20:27 +02:00
parent 64453ec683
commit 7c73949066
3 changed files with 46 additions and 6 deletions

View file

@ -27,6 +27,8 @@ pub struct Post {
pub struct NewThread {
pub title: String,
pub body: String,
pub author_name: String,
pub author_email: String,
}
#[derive(Deserialize, Insertable)]
@ -34,4 +36,6 @@ pub struct NewThread {
pub struct NewPost {
pub thread_id: i32,
pub body: String,
pub author_name: String,
pub author_email: String,
}