Skip to content

Commit

Permalink
feat: use personal project as default after login
Browse files Browse the repository at this point in the history
  • Loading branch information
pxseu committed Oct 14, 2022
1 parent 44b34be commit d3f605a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/auth/login/mod.rs
Expand Up @@ -61,7 +61,7 @@ pub async fn token(token: &str, mut state: State) -> Result<()> {
// output the login info
log::info!("Logged in as: `{}` ({})", authorized.name, authorized.email);

state.ctx.default_project = None;
state.ctx.default_project = authorized.projects.first().map(|x| x.id.clone());
state.ctx.default_user = Some(authorized.id.clone());
state.ctx.save().await?;
}
Expand Down

0 comments on commit d3f605a

Please sign in to comment.