summaryrefslogtreecommitdiff
path: root/src/conversation/handlers/create/mod.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-10-28 14:41:50 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-10-28 14:41:50 -0400
commit4a91792e023a5877f8ac9b8a352e99c4486d698f (patch)
tree0b0e5466d0945a5f853e98eb8d0b0215e67ed3fb /src/conversation/handlers/create/mod.rs
parent9c271b27ff03cf4976326090ff54e3b5dfc04962 (diff)
parent0ef69c7d256380e660edc45ace7f1d6151226340 (diff)
Merge remote-tracking branch 'codeberg/main' into push-notify
Diffstat (limited to 'src/conversation/handlers/create/mod.rs')
-rw-r--r--src/conversation/handlers/create/mod.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/conversation/handlers/create/mod.rs b/src/conversation/handlers/create/mod.rs
index 18eca1f..2b7fa39 100644
--- a/src/conversation/handlers/create/mod.rs
+++ b/src/conversation/handlers/create/mod.rs
@@ -5,9 +5,8 @@ use axum::{
};
use crate::{
- app::App,
clock::RequestedAt,
- conversation::{Conversation, app},
+ conversation::{Conversation, app, app::Conversations},
error::Internal,
name::Name,
token::extract::Identity,
@@ -17,13 +16,12 @@ use crate::{
mod test;
pub async fn handler(
- State(app): State<App>,
+ State(conversations): State<Conversations>,
_: Identity, // requires auth, but doesn't actually care who you are
RequestedAt(created_at): RequestedAt,
Json(request): Json<Request>,
) -> Result<Response, Error> {
- let conversation = app
- .conversations()
+ let conversation = conversations
.create(&request.name, &created_at)
.await
.map_err(Error)?;