This commit is contained in:
2023-03-27 18:03:20 +02:00
parent 8b121c9e6e
commit b3061ad79a
11 changed files with 516 additions and 30 deletions
+1
View File
@@ -1 +1,2 @@
pub mod feed;
pub mod new_feed;
+15
View File
@@ -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 }
}
}