Skip to content

Commit

Permalink
fix(use-running-status): bearer token
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet committed Jan 13, 2023
1 parent 8d72920 commit e754161
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCallback, useState } from 'react'

//import { useAuth } from '@qovery/shared/auth'
import { useAuth } from '@qovery/shared/auth'

export interface RunningStatusWebsocketProps {
organizationId: string
Expand All @@ -11,7 +10,7 @@ const baseUrl = 'wss://ws.qovery.com/service/status'
export function useRunningStatusWebsocket() {
const [websockets, setWebsockets] = useState<string[]>([])
const [websocketsUrl, setWebsocketsUrl] = useState<string[]>([])
//const { getAccessTokenSilently } = useAuth()
const { getAccessTokenSilently } = useAuth()

const closeSockets = useCallback((): void => {
setWebsockets([])
Expand All @@ -27,7 +26,7 @@ export function useRunningStatusWebsocket() {
}

const openWebSocket = async (organizationId: string, clusterId: string): Promise<void> => {
const token = null //await getAccessTokenSilently()
const token = await getAccessTokenSilently()

setWebsockets((prevValue) => {
const webSocketId = `${organizationId}-${clusterId}`
Expand Down

0 comments on commit e754161

Please sign in to comment.