feat(handlers): Extract & add author to thread and post information
This commit is contained in:
parent
64453ec683
commit
7c73949066
3 changed files with 46 additions and 6 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue