This commit is contained in:
2026-08-09 10:30:54 +02:00
parent 93800e8460
commit 20beea24d5
11 changed files with 325 additions and 61 deletions
+5 -2
View File
@@ -104,7 +104,7 @@ pub async fn create(
Json(payload): Json<CreateMessageRequest>,
) -> Result<(StatusCode, Json<MessageResponse>), HTTPError> {
// Vérifier que le canal existe
state
let channel = state
.repositories
.channel
.get_by_id(payload.channel_id)
@@ -130,7 +130,10 @@ pub async fn create(
.await?;
Ok((
StatusCode::CREATED,
Json(mapper::message_model_to_message_response(message)),
Json(mapper::message_model_to_message_response_with_server_id(
message,
channel.server_id,
)),
))
}