This commit is contained in:
JMARyA 2024-09-09 21:49:36 +02:00
parent 21fe567ba6
commit e7fe303941
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 54 additions and 21 deletions

View file

@ -30,7 +30,7 @@ impl<'r> FromRequest<'r> for Token {
type Error = ();
async fn from_request(request: &'r Request<'_>) -> rocket::request::Outcome<Self, Self::Error> {
match request.headers().get_one("token") {
match request.headers().get_one("Token") {
Some(key) => Outcome::Success(Token(key.to_string())),
None => Outcome::Error((Status::Unauthorized, ())),
}