Add a route to get a single inbox entry

This commit is contained in:
2025-05-08 16:47:32 +02:00
parent df7f395e8b
commit b6af889dc5
6 changed files with 87 additions and 5 deletions

View File

@ -1,5 +1,6 @@
use crate::controllers::HttpResult;
use crate::extractors::auth_extractor::AuthExtractor;
use crate::extractors::inbox_entry_extractor::InboxEntryInPath;
use crate::services::inbox_service;
use crate::services::inbox_service::UpdateInboxEntryQuery;
use actix_web::{HttpResponse, web};
@ -35,3 +36,8 @@ pub async fn get_list(auth: AuthExtractor, query: web::Query<GetInboxQuery>) ->
Ok(HttpResponse::Ok().json(list))
}
/// Get a single inbox entry
pub async fn get_single(entry: InboxEntryInPath) -> HttpResult {
Ok(HttpResponse::Ok().json(entry.as_ref()))
}