print error when validating
This commit is contained in:
parent
6d87adb2e6
commit
abc1f367bb
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue