Add wait_for_event route & update deps
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
use crate::routes::pages;
|
||||
use rocket::{
|
||||
catch,
|
||||
form::{Form, FromForm},
|
||||
http::{Cookie, CookieJar, Status},
|
||||
post,
|
||||
request::{Form, FromForm, FromRequest, Outcome, Request},
|
||||
request::{FromRequest, Outcome, Request},
|
||||
response::Redirect,
|
||||
uri, State,
|
||||
};
|
||||
@ -26,10 +27,10 @@ pub struct Authorized;
|
||||
pub struct Unauthorized;
|
||||
|
||||
#[rocket::async_trait]
|
||||
impl<'a, 'r> FromRequest<'a, 'r> for Authorized {
|
||||
impl<'a> FromRequest<'a> for Authorized {
|
||||
type Error = Unauthorized;
|
||||
|
||||
async fn from_request(request: &'a Request<'r>) -> Outcome<Self, Self::Error> {
|
||||
async fn from_request(request: &'a Request<'_>) -> Outcome<Self, Self::Error> {
|
||||
let cookies = request.cookies();
|
||||
|
||||
match cookies.get_private(AUTH_COOKIE_KEY) {
|
||||
|
||||
Reference in New Issue
Block a user