1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-24 20:43:59 +00:00

Trying to fix issue #687

- Using an older commit from rocket repo
This commit is contained in:
BlackDex 2019-11-04 14:30:24 +01:00
parent e449912f05
commit 3442eb1b9d
3 changed files with 17 additions and 18 deletions

View file

@ -76,8 +76,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for DbConn {
type Error = ();
fn from_request(request: &'a Request<'r>) -> request::Outcome<DbConn, ()> {
// https://github.com/SergioBenitez/Rocket/commit/e3c1a4ad3ab9b840482ec6de4200d30df43e357c
let pool = try_outcome!(request.guard::<State<Pool>>());
let pool = request.guard::<State<Pool>>()?;
match pool.get() {
Ok(conn) => Outcome::Success(DbConn(conn)),
Err(_) => Outcome::Failure((Status::ServiceUnavailable, ())),