Change get articles to read from database instead of dummy data.
This commit is contained in:
@@ -2,11 +2,11 @@ use actix_web::{HttpResponse, Responder};
|
||||
use reqwest::StatusCode;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::reader::structs::feed::Feed;
|
||||
use crate::reader::structs::feed::FeedAggregate;
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Articles {
|
||||
pub feeds: Vec<Feed>,
|
||||
pub feeds: Vec<FeedAggregate>,
|
||||
}
|
||||
|
||||
impl Responder for Articles {
|
||||
|
||||
@@ -3,3 +3,4 @@ pub mod login;
|
||||
pub mod new_feed;
|
||||
pub mod new_feed_item;
|
||||
pub mod new_user;
|
||||
pub mod user;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
use serde_derive::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub struct JsonUser {
|
||||
pub user_id: i32,
|
||||
}
|
||||
Reference in New Issue
Block a user