Record Message Event Response endpoint #22

Merged
phoenix merged 11 commits from record_mer-endpoint into alot_of_changes 2026-06-20 13:38:23 -04:00
Showing only changes of commit f44c8ee6da - Show all commits
+12 -1
View File
@@ -17,6 +17,7 @@ pub mod init {
use crate::caller::contact as contact_caller;
use crate::caller::message as message_caller;
use crate::caller::message::scheduling as scheduling_caller;
use crate::caller::message::event as event_caller;
use contact_caller::endpoint as contact_endpoints;
use contact_caller::response as contact_responses;
@@ -24,6 +25,8 @@ pub mod init {
use message_caller::response as message_responses;
use scheduling_caller::endpoint as scheduling_endpoints;
use scheduling_caller::response as scheduling_responses;
use event_caller::endpoint as event_endpoints;
use event_caller::response as event_responses;
mod cors {
pub async fn configure_cors() -> tower_http::cors::CorsLayer {
@@ -85,7 +88,9 @@ pub mod init {
scheduling_endpoints::schedule_message,
),
components(schemas(contact_responses::AddContactResponse, message_responses::AddMessageResponse,
scheduling_responses::ScheduleMessageResponse)),
scheduling_responses::ScheduleMessageResponse,
event_responses::RecordMessageEventResponse
)),
tags(
(name = "textsender API", description = "Web API to manage texting")
)
@@ -166,6 +171,12 @@ pub mod init {
axum::middleware::from_fn(crate::auth::auth::<axum::body::Body>),
),
)
.route(
crate::caller::endpoints::RECORD_MESSAGE_EVENT_RESPONSE,
post(event_endpoints::record_message_event_response).route_layer(
axum::middleware::from_fn(crate::auth::auth::<axum::body::Body>),
),
)
.layer(cors::configure_cors().await)
}