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:
parent
78cc66972d
commit
55f2de1e92
2 changed files with 2 additions and 3 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue