@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 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 this.axiosInstance.post(
117
- this.config.refreshTokenEndpoint,
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.axiosInstance.post(
81
- this.config.refreshTokenEndpoint,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sabuj0338/axios-friday",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Friday - a axios based api handling custom class. which has refresh token mechanism configured.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",