Skip to content

Commit 08b81c0

Browse files
committed
fix(api): use full url for token refresh endpoint
1 parent 3be1366 commit 08b81c0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎web/src/lib/api-client.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ describe('ApiClient', () => {
184184
})
185185

186186
describe('token refresh', () => {
187-
it.skip('should attempt refresh on 401 and update session', async () => {
187+
it('should attempt refresh on 401 and update session', async () => {
188188
useSessionStore.setState({
189189
user: { id: '1', email: 'test@test.com', name: 'Test' },
190190
token: 'old-token',

‎web/src/lib/api-client.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class ApiClient {
7373
}
7474

7575
try {
76-
const response = await fetch(API_ENDPOINTS.AUTH.REFRESH, {
76+
const refreshUrl = this.buildUrl(API_ENDPOINTS.AUTH.REFRESH)
77+
const response = await fetch(refreshUrl, {
7778
method: 'POST',
7879
headers: {
7980
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)