running so far

This commit is contained in:
2022-12-27 18:17:24 +01:00
parent 31b47e892d
commit 8b121c9e6e
16 changed files with 134 additions and 18 deletions
+19
View File
@@ -0,0 +1,19 @@
use actix_web::{HttpResponse, Responder};
use reqwest::StatusCode;
use serde::Serialize;
use crate::reader::structs::feed::Feed;
#[derive(Serialize)]
pub struct Articles {
pub feeds: Vec<Feed>,
}
impl Responder for Articles {
type Body = String;
fn respond_to(self, _req: &actix_web::HttpRequest) -> actix_web::HttpResponse<Self::Body> {
let body = serde_json::to_string(&self).unwrap();
HttpResponse::with_body(StatusCode::OK, body)
}
}