chore: Migrate to axum 0.8
Co-authored-by: dasha_uwu
This commit is contained in:
parent
4158c1cf62
commit
87d26e69ed
6 changed files with 89 additions and 38 deletions
src/api/router
|
@ -48,7 +48,7 @@ pub(super) async fn auth(
|
|||
json_body: Option<&CanonicalJsonValue>,
|
||||
metadata: &Metadata,
|
||||
) -> Result<Auth> {
|
||||
let bearer: Option<TypedHeader<Authorization<Bearer>>> = request.parts.extract().await?;
|
||||
let bearer: Option<TypedHeader<Authorization<Bearer>>> = request.parts.extract().await.unwrap_or(None);
|
||||
let token = match &bearer {
|
||||
| Some(TypedHeader(Authorization(bearer))) => Some(bearer.token()),
|
||||
| None => request.query.access_token.as_deref(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue