diff --git a/front/src/services/authService.ts b/front/src/services/authService.ts index b1f41de..65253d4 100644 --- a/front/src/services/authService.ts +++ b/front/src/services/authService.ts @@ -33,7 +33,6 @@ export const authService = { async getMe() : Promise { const raw = await api.get('/api/User/me') - // backend User may have fields like userName / UserName and email / Email const userId = raw?.userId ?? '' const username = raw?.userName ?? raw?.UserName ?? raw?.username ?? raw?.name ?? '' const email = raw?.email ?? raw?.Email ?? '' diff --git a/front/src/stores/whiteboard.ts b/front/src/stores/whiteboard.ts index 81687db..6c0fbba 100644 --- a/front/src/stores/whiteboard.ts +++ b/front/src/stores/whiteboard.ts @@ -33,23 +33,6 @@ export const useWhiteboardStore = defineStore('whiteboard', () => { } }) - async function initializeSession(id: string) { - isLoading.value = true; - error.value = null; - - try{ - await whiteboardHubService.connect() - isConnected.value = true; - - registerHubEvents() - - await whiteboardHubService.joinWhiteboard(id) - } catch (e: any) { - error.value = e?.message ?? 'Failed to join whiteboard' - isLoading.value = false - } - } - function registerHubEvents() { whiteboardHubService.offAll() @@ -153,7 +136,7 @@ export const useWhiteboardStore = defineStore('whiteboard', () => { await whiteboardHubService.joinWhiteboard(id) } catch (e: any) { - error.value = e?.message ?? 'Failed to join whiteboard' + error.value = 'Failed to join whiteboard, please try again' isLoading.value = false } } diff --git a/front/src/views/LoginView.vue b/front/src/views/LoginView.vue index ce433c3..e8dce1e 100644 --- a/front/src/views/LoginView.vue +++ b/front/src/views/LoginView.vue @@ -1,9 +1,10 @@