@sabuj0338/axios-friday 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -6
- package/dist/index.mjs +3 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -113,12 +113,9 @@ var Friday = class {
|
|
|
113
113
|
if (this.config.refreshTokenEndpoint == void 0) return;
|
|
114
114
|
const refreshToken = this.getRefreshToken();
|
|
115
115
|
if (refreshToken === void 0) throw new Error("Unauthorized Attempt!");
|
|
116
|
-
const res = await
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
refreshToken
|
|
120
|
-
}
|
|
121
|
-
);
|
|
116
|
+
const res = await import_axios.default.post(this.config.baseURL + this.config.refreshTokenEndpoint, {
|
|
117
|
+
refreshToken
|
|
118
|
+
});
|
|
122
119
|
if (res.status != 200)
|
|
123
120
|
throw new Error("Refresh access token request failed!");
|
|
124
121
|
this.resetTokens(res);
|
package/dist/index.mjs
CHANGED
|
@@ -77,12 +77,9 @@ var Friday = class {
|
|
|
77
77
|
if (this.config.refreshTokenEndpoint == void 0) return;
|
|
78
78
|
const refreshToken = this.getRefreshToken();
|
|
79
79
|
if (refreshToken === void 0) throw new Error("Unauthorized Attempt!");
|
|
80
|
-
const res = await this.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
refreshToken
|
|
84
|
-
}
|
|
85
|
-
);
|
|
80
|
+
const res = await axios.post(this.config.baseURL + this.config.refreshTokenEndpoint, {
|
|
81
|
+
refreshToken
|
|
82
|
+
});
|
|
86
83
|
if (res.status != 200)
|
|
87
84
|
throw new Error("Refresh access token request failed!");
|
|
88
85
|
this.resetTokens(res);
|
package/package.json
CHANGED