flows
This commit is contained in:
parent
21fe567ba6
commit
e7fe303941
6 changed files with 54 additions and 21 deletions
|
@ -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, ())),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue