@nomalism-com/api 0.46.36 → 0.46.38

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4707,9 +4707,9 @@ var API = class {
4707
4707
  (error) => Promise.reject(parseApiError(error))
4708
4708
  );
4709
4709
  const getServicePath = (service) => {
4710
- const baseUrl = services[service];
4711
- const servicePath = processEnvironment === "localhost" ? "/" : `${service}/`;
4712
- return `${baseUrl}${servicePath}`;
4710
+ const baseUrl = services[service].replace(/\/+$/, "");
4711
+ const servicePath = processEnvironment === "localhost" ? "" : service;
4712
+ return `${baseUrl}/${servicePath}`.replace(/\/+$/, "") + "/";
4713
4713
  };
4714
4714
  this.services = {
4715
4715
  stock: getServicePath("stock"),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/api",
3
3
  "description": "A nomalism API package for performing HTTP requests on API endpoints",
4
- "version": "0.46.36",
4
+ "version": "0.46.38",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "prepack": "npm run lint && npm run build"
24
24
  },
25
25
  "dependencies": {
26
- "@nomalism-com/types": "^0.46.43",
26
+ "@nomalism-com/types": "^0.46.44",
27
27
  "axios": "^1.18.1"
28
28
  },
29
29
  "devDependencies": {