1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-17 00:12:31 +00:00

Updated dependencies and changed rocket request imports

This commit is contained in:
Daniel García 2020-07-19 21:01:31 +02:00
commit 32cfaab5ee
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
6 changed files with 124 additions and 115 deletions

View file

@ -4,8 +4,8 @@ use chrono::prelude::*;
use diesel::{r2d2, r2d2::ConnectionManager, Connection as DieselConnection, ConnectionError};
use rocket::{
http::Status,
request::{self, FromRequest},
Outcome, Request, State,
request::{FromRequest, Outcome},
Request, State,
};
use crate::{error::Error, CONFIG};
@ -71,7 +71,7 @@ pub fn backup_database() -> Result<(), Error> {
impl<'a, 'r> FromRequest<'a, 'r> for DbConn {
type Error = ();
fn from_request(request: &'a Request<'r>) -> request::Outcome<DbConn, ()> {
fn from_request(request: &'a Request<'r>) -> Outcome<DbConn, ()> {
// https://github.com/SergioBenitez/Rocket/commit/e3c1a4ad3ab9b840482ec6de4200d30df43e357c
let pool = try_outcome!(request.guard::<State<Pool>>());
match pool.get() {