@navservice/core 1.86.0 → 1.87.0
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/build/es/index.js
CHANGED
|
@@ -211,13 +211,11 @@ const _api_api = class _api {
|
|
|
211
211
|
}
|
|
212
212
|
static headers_form({ setToken = true }) {
|
|
213
213
|
const get_auth_user = utils_session_storage.get_item_session_storage("auth_user");
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
};
|
|
214
|
+
const headers = {};
|
|
215
|
+
if (setToken && get_auth_user?.data?.usuario?.token) headers.Authorization = `Bearer ${get_auth_user.data.usuario.token}`;
|
|
216
|
+
headers["Content-Type"] = "multipart/form-data";
|
|
219
217
|
return {
|
|
220
|
-
headers
|
|
218
|
+
headers
|
|
221
219
|
};
|
|
222
220
|
}
|
|
223
221
|
};
|
package/build/es/utils/_api.d.ts
CHANGED
|
@@ -51,13 +51,7 @@ declare const _api: {
|
|
|
51
51
|
headers_form({ setToken }: {
|
|
52
52
|
setToken?: boolean;
|
|
53
53
|
}): {
|
|
54
|
-
headers:
|
|
55
|
-
Authorization: string;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
headers: {
|
|
59
|
-
Authorization?: undefined;
|
|
60
|
-
};
|
|
54
|
+
headers: Record<string, string>;
|
|
61
55
|
};
|
|
62
56
|
};
|
|
63
57
|
export default _api;
|
|
@@ -51,13 +51,7 @@ declare const utils: {
|
|
|
51
51
|
headers_form({ setToken }: {
|
|
52
52
|
setToken?: boolean;
|
|
53
53
|
}): {
|
|
54
|
-
headers:
|
|
55
|
-
Authorization: string;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
headers: {
|
|
59
|
-
Authorization?: undefined;
|
|
60
|
-
};
|
|
54
|
+
headers: Record<string, string>;
|
|
61
55
|
};
|
|
62
56
|
};
|
|
63
57
|
data: {
|
package/build/lib/index.cjs
CHANGED
|
@@ -297,17 +297,14 @@ const _api_api = class _api {
|
|
|
297
297
|
}
|
|
298
298
|
static headers_form({ setToken = true }) {
|
|
299
299
|
const get_auth_user = utils_session_storage.get_item_session_storage("auth_user");
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
Authorization: `Bearer ${get_auth_user?.data?.usuario?.token}`
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
} else {
|
|
307
|
-
return {
|
|
308
|
-
headers: {}
|
|
309
|
-
};
|
|
300
|
+
const headers = {};
|
|
301
|
+
if (setToken && get_auth_user?.data?.usuario?.token) {
|
|
302
|
+
headers.Authorization = `Bearer ${get_auth_user.data.usuario.token}`;
|
|
310
303
|
}
|
|
304
|
+
headers["Content-Type"] = "multipart/form-data";
|
|
305
|
+
return {
|
|
306
|
+
headers
|
|
307
|
+
};
|
|
311
308
|
}
|
|
312
309
|
};
|
|
313
310
|
/* export default */ const utils_api = (_api_api);
|
|
@@ -51,13 +51,7 @@ declare const _api: {
|
|
|
51
51
|
headers_form({ setToken }: {
|
|
52
52
|
setToken?: boolean;
|
|
53
53
|
}): {
|
|
54
|
-
headers:
|
|
55
|
-
Authorization: string;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
headers: {
|
|
59
|
-
Authorization?: undefined;
|
|
60
|
-
};
|
|
54
|
+
headers: Record<string, string>;
|
|
61
55
|
};
|
|
62
56
|
};
|
|
63
57
|
export default _api;
|
|
@@ -51,13 +51,7 @@ declare const utils: {
|
|
|
51
51
|
headers_form({ setToken }: {
|
|
52
52
|
setToken?: boolean;
|
|
53
53
|
}): {
|
|
54
|
-
headers:
|
|
55
|
-
Authorization: string;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
headers: {
|
|
59
|
-
Authorization?: undefined;
|
|
60
|
-
};
|
|
54
|
+
headers: Record<string, string>;
|
|
61
55
|
};
|
|
62
56
|
};
|
|
63
57
|
data: {
|