Add wait_for_event route & update deps

This commit is contained in:
2021-04-22 14:21:25 +02:00
parent 5c43bb409e
commit e39cffa3f6
9 changed files with 583 additions and 552 deletions

View File

@ -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) {