Skip to content

Commit 007005b

Browse files
authored
[MOB-8430]: add /messages to interceptor routes for userId (#370)
* add `messages` to interceptor * oop * extra parens --------- Co-authored-by: mitch prewitt <[email protected]>
1 parent 9d8ab03 commit 007005b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/authorization/authorization.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ export function initialize(
7070
let authInterceptor: number | null = generateJWT
7171
? null
7272
: baseAxiosRequest.interceptors.request.use((config) => {
73-
config.headers.set('Api-Key', authToken);
73+
config.headers.set('Api-Key', authToken);
7474

75-
return config;
76-
});
75+
return config;
76+
});
7777
let userInterceptor: number | null = null;
7878
let responseInterceptor: number | null = null;
7979
/*
@@ -308,7 +308,7 @@ export function initialize(
308308
/*
309309
endpoints that use _userId_ query param in GET requests
310310
*/
311-
if (!!(config?.url || '').match(/getMessages/gim)) {
311+
if (!!(config?.url || '').match(/(getMessages)|(messages)/gim)) {
312312
return {
313313
...config,
314314
params: {
@@ -701,7 +701,7 @@ export function initialize(
701701
/*
702702
endpoints that use _userId_ query param in GET requests
703703
*/
704-
if (!!(config?.url || '').match(/getMessages/gim)) {
704+
if (!!(config?.url || '').match(/(getMessages)|(messages)/gim)) {
705705
return {
706706
...config,
707707
params: {

0 commit comments

Comments
 (0)