all new
This commit is contained in:
@@ -1 +1,2 @@
|
||||
pub mod feed;
|
||||
pub mod new_feed;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
use crate::schema::feed;
|
||||
use diesel::Insertable;
|
||||
|
||||
#[derive(Insertable, Clone)]
|
||||
#[diesel(table_name=feed)]
|
||||
pub struct NewFeed {
|
||||
pub title: String,
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
impl NewFeed {
|
||||
pub fn new(title: String, url: String) -> NewFeed {
|
||||
NewFeed { title, url }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user