Skip to content

Commit 182463a

Browse files
committed
feat: fix not finding user id issue by making subject inclusion optional
1 parent bccf67a commit 182463a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/src/hooks/useFindSession.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import axios from 'axios';
55
export const sessionInfo = async (sessionId: string): Promise<null | Session> => {
66
try {
77
const response = await axios.get(`/v1/sessions/${sessionId}`);
8-
const parsedResult = $Session.safeParse(response.data);
9-
return parsedResult.success ? parsedResult.data : null;
8+
const parsedResult = await $Session.parseAsync(response.data);
9+
return parsedResult;
1010
} catch (error) {
1111
console.error('Error fetching session:', error);
1212
throw error;

0 commit comments

Comments
 (0)