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:
parent
11845d9f5b
commit
32cfaab5ee
6 changed files with 124 additions and 115 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue