print error when validating

This commit is contained in:
hubert 2021-07-22 13:14:58 +02:00
parent 6d87adb2e6
commit abc1f367bb
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,4 @@
use actix_session::Session;
use actix_web::Error;
use actix_web_httpauth::extractors::basic::BasicAuth;
pub trait AuthValidator {
@ -13,7 +12,10 @@ pub trait AuthValidator {
let result = session.get::<String>("user");
match result {
Ok(username) => {username.map(|u| User(u))}
Err(e) => {None}
Err(e) => {
println!("{}", e);
None
}
}
}
}