summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-04-09 10:50:42 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-04-11 23:50:12 -0500
commit78a81465409fba33648701c8a20660259e16a807 (patch)
tree6a345b391f6067a32a884e6b388c47fb1083bcff /src/state.rs
parentd9ed52fc239e3547eb99fe03bd296ab2808d2ebc (diff)
refactor: move jwt_max_age to const
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/state.rs b/src/state.rs
index 4531a42..22234f3 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -13,16 +13,11 @@ use crate::Error;
pub struct AppState {
pub pool: Pool<Postgres>,
pub jwt_secret: String,
- pub jwt_max_age: time::Duration,
}
impl AppState {
- pub fn new(pool: Pool<Postgres>, jwt_secret: String, jwt_max_age: time::Duration) -> Self {
- Self {
- pool,
- jwt_secret,
- jwt_max_age,
- }
+ pub fn new(pool: Pool<Postgres>, jwt_secret: String) -> Self {
+ Self { pool, jwt_secret }
}
}