summaryrefslogtreecommitdiff
path: root/src/invite/handlers/accept/mod.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-08-24 03:56:02 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-08-24 04:51:24 -0400
commite1a8827a587949f3ac0c7a299e2745820ab368e1 (patch)
tree724c5974eaeec0242182c3ff6087f651b9e5a8f7 /src/invite/handlers/accept/mod.rs
parent4eb63b8adda4559df3dadcf721e2bb0d1f65a01f (diff)
Stop returning an HTTP body from `POST /api/invite/:id`.
As with the previous commits, the body was never actually being used.
Diffstat (limited to 'src/invite/handlers/accept/mod.rs')
-rw-r--r--src/invite/handlers/accept/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/invite/handlers/accept/mod.rs b/src/invite/handlers/accept/mod.rs
index 9fa4d6a..cdf385f 100644
--- a/src/invite/handlers/accept/mod.rs
+++ b/src/invite/handlers/accept/mod.rs
@@ -7,12 +7,12 @@ use axum::{
use crate::{
app::App,
clock::RequestedAt,
+ empty::Empty,
error::{Internal, NotFound},
invite::{app, handlers::PathInfo},
name::Name,
password::Password,
token::extract::IdentityCookie,
- user::User,
};
#[cfg(test)]
@@ -24,14 +24,14 @@ pub async fn handler(
identity: IdentityCookie,
Path(invite): Path<PathInfo>,
Json(request): Json<Request>,
-) -> Result<(IdentityCookie, Json<User>), Error> {
- let (login, secret) = app
+) -> Result<(IdentityCookie, Empty), Error> {
+ let secret = app
.invites()
.accept(&invite, &request.name, &request.password, &accepted_at)
.await
.map_err(Error)?;
let identity = identity.set(secret);
- Ok((identity, Json(login)))
+ Ok((identity, Empty))
}
#[derive(serde::Deserialize)]