@hzab/data-model
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@hzab/data-model", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "data model", | ||
@@ -5,0 +5,0 @@ "main": "src", |
@@ -13,6 +13,7 @@ import axios from "axios"; | ||
* @param {Function} cb | ||
* @param {Function} errCb | ||
*/ | ||
export function setAxRequest(cb) { | ||
export function setAxRequest(cb, errCb) { | ||
temp.axiosList?.forEach((_ax) => { | ||
_ax.interceptors.request.use(cb); | ||
_ax.interceptors.request.use(cb, errCb); | ||
}); | ||
@@ -24,2 +25,3 @@ } | ||
* @param {Function} cb | ||
* @param {Function} errCb | ||
*/ | ||
@@ -73,6 +75,10 @@ export function setAxResponse(cb, errCb) { | ||
*/ | ||
export function setAxToken(token) { | ||
setAxTimeout("Authorization", token); | ||
export function setAxAuthorization(token) { | ||
setAxHeaders("Authorization", token); | ||
} | ||
export function setAxBaseUrl(url) { | ||
setAxDefaults("baseURL", url); | ||
} | ||
export default axios; |
@@ -5,2 +5,3 @@ import axios from "./axios"; | ||
export * from "./axios"; | ||
export * from "./data-model"; | ||
@@ -7,0 +8,0 @@ export { axios, DataModel }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14508
380