Store entire Config struct on collab AppState

This commit is contained in:
Max Brunsfeld 2022-10-18 13:02:30 -07:00
parent 38bdf7ad92
commit 5e57a33df7
4 changed files with 13 additions and 13 deletions

View file

@ -76,7 +76,7 @@ pub async fn validate_api_token<B>(req: Request<B>, next: Next<B>) -> impl IntoR
let state = req.extensions().get::<Arc<AppState>>().unwrap();
if token != state.api_token {
if token != state.config.api_token {
Err(Error::Http(
StatusCode::UNAUTHORIZED,
"invalid authorization token".to_string(),