diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 03:48:17 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-08-24 04:51:24 -0400 |
| commit | 4eb63b8adda4559df3dadcf721e2bb0d1f65a01f (patch) | |
| tree | 4fc62e30770ec84be431a5dabc2aead3eaad88f9 /src/user/handlers/login/mod.rs | |
| parent | 1a0ee4af6538b5486d35730d480d00ca4d9edafb (diff) | |
Stop returning body data from `POST /api/auth/login`.
As with `/api/setup`, the response was an ad-hoc choice, which we are not using and which constrains future development just by existing.
Diffstat (limited to 'src/user/handlers/login/mod.rs')
| -rw-r--r-- | src/user/handlers/login/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/user/handlers/login/mod.rs b/src/user/handlers/login/mod.rs index da88885..d3e0e8c 100644 --- a/src/user/handlers/login/mod.rs +++ b/src/user/handlers/login/mod.rs @@ -7,11 +7,11 @@ use axum::{ use crate::{ app::App, clock::RequestedAt, + empty::Empty, error::Internal, name::Name, password::Password, token::{app, extract::IdentityCookie}, - user::User, }; #[cfg(test)] @@ -22,14 +22,14 @@ pub async fn handler( RequestedAt(now): RequestedAt, identity: IdentityCookie, Json(request): Json<Request>, -) -> Result<(IdentityCookie, Json<User>), Error> { - let (user, secret) = app +) -> Result<(IdentityCookie, Empty), Error> { + let secret = app .tokens() .login(&request.name, &request.password, &now) .await .map_err(Error)?; let identity = identity.set(secret); - Ok((identity, Json(user))) + Ok((identity, Empty)) } #[derive(serde::Deserialize)] |
