Skip to content

Commit

Permalink
terminal fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Feb 7, 2024
1 parent 4f9e2de commit 2fbca1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/terminal/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const getSupabase = (access_token?: string) => {
}

export const getMe = async (session: { access_token: string | undefined }) => {
const { data: { user }, error} = await getSupabase(session.access_token).auth.getUser()
const { data: { user }, error} = await getSupabase(session?.access_token).auth.getUser()
if (error) {
await getSupabase(session.access_token).auth.signOut();
await getSupabase(session?.access_token).auth.signOut();
console.log('*** error', error)
return null;
} else {
Expand All @@ -71,7 +71,7 @@ async function startApplication() {
// Assuming session information is stored in the .cjrc file
const userData = JSON.parse(fs.readFileSync(configFile).toString());
const session = userData?.session;
const supabase = getSupabase(session.access_token);
const supabase = getSupabase(session?.access_token);
let user = null as any;
if (session) {
// Get user information or perform any other session-related initialization here
Expand Down

0 comments on commit 2fbca1d

Please sign in to comment.