Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Jun 15, 2024
1 parent a4a5b5e commit 54a0e1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bin/command/auth/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ struct CallbackPayload {
enum CallbackError {
#[error(transparent)]
Io(#[from] std::io::Error),

#[error("Api error: {0}")]
Api(#[from] slot::api::Error),

#[error(transparent)]
Other(#[from] anyhow::Error),

#[error(transparent)]
Credentials(#[from] slot::credential::Error),
}

impl IntoResponse for CallbackError {
Expand Down Expand Up @@ -90,7 +95,7 @@ async fn handler(Query(payload): Query<CallbackPayload>) -> Result<Redirect, Cal
let account_info = res.data.map(|data| data.me.expect("should exist"));

// 2. Store the access token locally
Credentials::new(account_info, token).write()?;
Credentials::new(account_info, token).store()?;

println!("You are now logged in!\n");

Expand Down

0 comments on commit 54a0e1f

Please sign in to comment.