Skip to content

Commit 5823ed6

Browse files
committed
feat: test
1 parent e1e6982 commit 5823ed6

File tree

1 file changed

+14
-2
lines changed
  • apps/tuk-web/src/shared/lib/api/rest

1 file changed

+14
-2
lines changed

apps/tuk-web/src/shared/lib/api/rest/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,25 @@ import { getBridgeSender } from '@/shared/lib/app-bridge/bridgeSender';
66
export { RestAPI } from './rest';
77
export type { RestAPIConfig, RestAPIProtocol } from './types';
88

9+
// const defaultJsonInstance = (baseURL: string) =>
10+
// new RestAPIInstance(baseURL, {
11+
// withCredentials: false,
12+
// authHeader: () => {
13+
// if (typeof window === 'undefined') return null;
14+
// const token = sessionStorage.getItem('accessToken');
15+
// return token ? { Authorization: `Bearer ${token}` } : null;
16+
// },
17+
// bridgeSend: msg => getBridgeSender()?.(msg),
18+
// });
19+
920
const defaultJsonInstance = (baseURL: string) =>
1021
new RestAPIInstance(baseURL, {
1122
withCredentials: false,
1223
authHeader: () => {
1324
if (typeof window === 'undefined') return null;
14-
const token = sessionStorage.getItem('accessToken');
15-
return token ? { Authorization: `Bearer ${token}` } : null;
25+
const token =
26+
'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzNiIsIm1lbWJlcklkIjoiMzYiLCJ0b2tlblR5cGUiOiJBQ0NFU1MiLCJpYXQiOjE3NTUwOTM4NDMsImV4cCI6MTc1NzY4NTg0M30.UsHc49wjfip_NsMEK3Iwx8foswcGeECMuIZZjn57yBk';
27+
return token ? { Authorization: `Bearer ${token.trim()}` } : null;
1628
},
1729
bridgeSend: msg => getBridgeSender()?.(msg),
1830
});

0 commit comments

Comments
 (0)