Skip to content

Commit

Permalink
fix: fix sonar q
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Machado committed Jan 16, 2025
1 parent e93ac8b commit 84051ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/providers/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ client.interceptors.response.use(
const userId = response.headers[HEADER_KEYS.USER_ID] || '';

const expiration = response.headers[HEADER_KEYS.EXPIRY]
? dayjs.unix(parseInt(response.headers[HEADER_KEYS.EXPIRY])).toISOString()
? dayjs
.unix(parseInt(response.headers[HEADER_KEYS.EXPIRY], 10))
.toISOString()
: dayjs().add(1, 'hour').toISOString();

if (accessToken && refreshToken && userId && expiration) {
Expand Down

0 comments on commit 84051ed

Please sign in to comment.