added feeds

This commit is contained in:
2023-09-17 11:54:37 +02:00
parent 018bbf3918
commit 43e5d473b7
21 changed files with 76 additions and 25 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
pub mod feed;
pub mod new_feed;
pub mod rss_feed;
+7 -2
View File
@@ -6,10 +6,15 @@ use diesel::Insertable;
pub struct NewFeed {
pub title: String,
pub url: String,
pub user_id: i32,
}
impl NewFeed {
pub fn new(title: String, url: String) -> NewFeed {
NewFeed { title, url }
pub fn new(title: String, url: String, user_id: i32) -> NewFeed {
NewFeed {
title,
url,
user_id,
}
}
}
@@ -1,4 +1,4 @@
use super::super::user::user::User;
use super::super::user::rss_user::User;
use crate::schema::feed;
use diesel::{Associations, Identifiable, Queryable};
+1 -1
View File
@@ -1 +1 @@
mod feed_item;
mod rss_feed_item;
+1 -2
View File
@@ -1,3 +1,2 @@
pub mod new_user;
pub mod user;
pub mod rss_user;