mark read backend
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
use actix_web::{web, HttpRequest, HttpResponse, Responder};
|
||||
|
||||
use crate::json_serialization::read_feed_item::ReadItem;
|
||||
|
||||
pub async fn mark_read(_req: HttpRequest, path: web::Path<ReadItem>) -> impl Responder {
|
||||
log::info!("Id: {}", path.id);
|
||||
HttpResponse::Ok()
|
||||
}
|
||||
@@ -4,6 +4,7 @@ use crate::views::path::Path;
|
||||
mod add;
|
||||
pub mod feeds;
|
||||
mod get;
|
||||
mod mark_read;
|
||||
mod read;
|
||||
mod scraper;
|
||||
pub mod structs;
|
||||
@@ -30,4 +31,8 @@ pub fn feed_factory(app: &mut web::ServiceConfig) {
|
||||
&base_path.define(String::from("/read")),
|
||||
actix_web::Route::to(web::post(), read::read),
|
||||
);
|
||||
app.route(
|
||||
&base_path.define(String::from("/read/{id}")),
|
||||
actix_web::Route::to(web::put(), mark_read::mark_read),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user