refactor: deduplicate SESSION_COOKIE_NAME constant

Make the constant pub(crate) in application::auth and remove the
duplicate definition from routes::app::auth.
This commit is contained in:
Jon Seager 2026-02-13 13:04:34 +00:00
parent 78cc66972d
commit 55f2de1e92
No known key found for this signature in database
2 changed files with 2 additions and 3 deletions

View file

@ -9,7 +9,7 @@ use crate::application::state::AppState;
use crate::domain::users::User;
use crate::infrastructure::auth::hash_token;
const SESSION_COOKIE_NAME: &str = "brewlog_session";
pub(crate) const SESSION_COOKIE_NAME: &str = "brewlog_session";
/// Extension type to carry authenticated user through request handlers
#[derive(Debug, Clone)]

View file

@ -6,12 +6,11 @@ use serde::Deserialize;
use tower_cookies::{Cookie, Cookies};
use tracing::{info, warn};
use crate::application::auth::SESSION_COOKIE_NAME;
use crate::application::routes::render_html;
use crate::application::state::AppState;
use crate::infrastructure::auth::hash_token;
const SESSION_COOKIE_NAME: &str = "brewlog_session";
#[derive(Debug, Deserialize)]
pub struct LoginQuery {
pub cli_callback: Option<String>,