Store entire Config struct on collab AppState
This commit is contained in:
parent
38bdf7ad92
commit
5e57a33df7
4 changed files with 13 additions and 13 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue