From 2420f1e75d54a5f209b0267715f078a369d81eb1 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sun, 23 Mar 2025 15:58:33 -0400 Subject: Rename the `login` module to `user`. --- src/boot/routes/get.rs | 6 +++--- src/boot/routes/test.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/boot/routes') diff --git a/src/boot/routes/get.rs b/src/boot/routes/get.rs index 563fbf1..c04c6b3 100644 --- a/src/boot/routes/get.rs +++ b/src/boot/routes/get.rs @@ -3,19 +3,19 @@ use axum::{ response::{self, IntoResponse}, }; -use crate::{app::App, boot::Snapshot, error::Internal, login::Login, token::extract::Identity}; +use crate::{app::App, boot::Snapshot, error::Internal, token::extract::Identity, user::User}; pub async fn handler(State(app): State, identity: Identity) -> Result { let snapshot = app.boot().snapshot().await?; Ok(Response { - login: identity.login, + login: identity.user, snapshot, }) } #[derive(serde::Serialize)] pub struct Response { - pub login: Login, + pub login: User, #[serde(flatten)] pub snapshot: Snapshot, } diff --git a/src/boot/routes/test.rs b/src/boot/routes/test.rs index 202dcb9..5bd9f66 100644 --- a/src/boot/routes/test.rs +++ b/src/boot/routes/test.rs @@ -12,7 +12,7 @@ async fn returns_identity() { .await .expect("boot always succeeds"); - assert_eq!(viewer.login, response.login); + assert_eq!(viewer.user, response.login); } #[tokio::test] -- cgit v1.2.3