Skip to content

Commit

Permalink
Merge pull request #19 from Alokit-Innovations/tr/refreshTokenBugFix
Browse files Browse the repository at this point in the history
Refresh token bug fix
  • Loading branch information
tapishr authored Oct 25, 2023
2 parents 5883a31 + fec9059 commit 452eda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vibi-dpu/src/bitbucket/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ pub async fn refresh_git_auth(clone_url: &str, directory: &str) -> Option<String
return None;
}
let authinfo = authinfo_opt.expect("empty authinfo_opt in refresh_git_auth");
let mut access_token = authinfo.access_token().to_string();
let authinfo_opt = update_access_token(&authinfo, clone_url, directory).await;
if authinfo_opt.is_none() {
eprintln!("Empty authinfo_opt from update_access_token");
return None;
}

let latest_authinfo = authinfo_opt.expect("Empty authinfo_opt");
let access_token = latest_authinfo.access_token().to_string();
return Some(access_token);
}

Expand Down

0 comments on commit 452eda0

Please sign in to comment.