perf: avoid cloning when checking access
This commit is contained in:
parent
7b86706793
commit
2864196584
2 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ pub async fn res(mut payload: web::Payload, path: web::Path<(String,)>, data: we
|
|||
|
||||
let authentication_request = serde_json::from_slice::<AuthenticationRequest>(&body)?;
|
||||
|
||||
let authorized = check_access_token(authentication_request.access_token, data.pool.clone()).await;
|
||||
let authorized = check_access_token(authentication_request.access_token, &data.pool).await;
|
||||
|
||||
if authorized.is_err() {
|
||||
return Ok(authorized.unwrap_err())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue