@konversi/konversi-client 1.0.0 → 1.0.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/index.ts +6 -7
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import axiosAPI, { setAuthToken } from "./axiosAPI";
|
|
2
|
-
|
|
3
|
-
function setToken(token: string) {
|
|
4
|
-
setAuthToken(token);
|
|
5
|
-
}
|
|
1
|
+
import axiosAPI, { setAuthToken, setCompanyId } from "./axiosAPI";
|
|
6
2
|
|
|
7
3
|
async function getAllObjects(entity, queryParams = {}) {
|
|
8
4
|
const response = await axiosAPI.get(`${entity}`, {
|
|
@@ -34,10 +30,13 @@ async function deleteObject(entity, id) {
|
|
|
34
30
|
}
|
|
35
31
|
|
|
36
32
|
const konversiAPI = {
|
|
37
|
-
setToken,
|
|
33
|
+
setToken: setAuthToken,
|
|
34
|
+
setCompanyId,
|
|
38
35
|
getAllObjects,
|
|
39
36
|
getObjectById,
|
|
40
37
|
updateObject,
|
|
41
38
|
createObject,
|
|
42
39
|
deleteObject
|
|
43
|
-
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default konversiAPI;
|