Skip to content

Commit

Permalink
make user_id in auth store optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Nov 27, 2024
1 parent cc99121 commit da27ce0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::web_api;
#[derive(Serialize, Deserialize, Type, Debug)]
pub struct AuthStore {
pub token: String,
pub user_id: String,
pub user_id: Option<String>,
pub expires: i32,
pub plan: Option<Plan>,
}
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1833,8 +1833,8 @@ pub async fn run() {

if let Ok(Some(auth)) = AuthStore::load(&app) {
sentry::configure_scope(|scope| {
scope.set_user(Some(sentry::User {
id: Some(auth.user_id),
scope.set_user(auth.user_id.map(|id| sentry::User {
id: Some(id),
..Default::default()
}));
});
Expand Down

1 comment on commit da27ce0

@vercel
Copy link

@vercel vercel bot commented on da27ce0 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.