Skip to content

Commit 7fc569c

Browse files
authored
Merge pull request #152 from aliansoftwareteam/fix/issue-38-jwt-retry-preserves-options
fix: preserve dataType and options across JWT refresh retry (#38)
2 parents a97fbf4 + 618dd2b commit 7fc569c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/services/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export const apiRequest = (type, endPoint, data, dataType, options) => {
184184
}else if (err?.response?.data?.isJwtError) {
185185
const userId = localStorage.getItem('userId') || "";
186186
await getAuth(userId);
187-
apiRequest(type, endPoint, data).then((sData)=>{
187+
apiRequest(type, endPoint, data, dataType, options).then((sData)=>{
188188
resolve(sData);
189189
}).catch((err) => {
190190
reject(err);
@@ -234,7 +234,7 @@ export const apiRequestWithoutCompnay = (type, endPoint, data, dataType,options)
234234
} else if (err?.response?.data?.isJwtError) {
235235
const userId = localStorage.getItem('userId') || "";
236236
await getAuth(userId);
237-
apiRequestWithoutCompnay(type, endPoint, data).then((sData)=>{
237+
apiRequestWithoutCompnay(type, endPoint, data, dataType, options).then((sData)=>{
238238
resolve(sData);
239239
}).catch((err) => {
240240
reject(err);

0 commit comments

Comments
 (0)