btrz-api-client 8.3.0 → 8.4.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.
@@ -15,7 +15,7 @@ function routesFactory(_ref) {
15
15
  headers = _ref2.headers;
16
16
 
17
17
  return client({
18
- url: "/route/" + routeId,
18
+ url: "/routes/" + routeId,
19
19
  params: query,
20
20
  headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
21
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@ const {authorizationHeaders} = require("./../endpoints_helpers.js");
3
3
  function routesFactory({client, internalAuthTokenProvider}) {
4
4
  function get({routeId, token, query = {}, headers}) {
5
5
  return client({
6
- url: `/route/${routeId}`,
6
+ url: `/routes/${routeId}`,
7
7
  params: query,
8
8
  headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
9
9
  });
@@ -1,7 +1,7 @@
1
1
  const {axiosMock, expectRequest} = require("./../../test-helpers.js");
2
2
  const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
3
3
 
4
- describe("inventory/route", () => {
4
+ describe("inventory/routes", () => {
5
5
  const token = "I owe you a token";
6
6
  const jwtToken = "I owe you a JWT token";
7
7
 
@@ -10,7 +10,7 @@ describe("inventory/route", () => {
10
10
  });
11
11
 
12
12
  it("should get route by id", () => {
13
- axiosMock.onGet("/route/1").reply(expectRequest({statusCode: 200, token}));
13
+ axiosMock.onGet("/routes/1").reply(expectRequest({statusCode: 200, token}));
14
14
  return api.inventory.routes.get({token, routeId: 1});
15
15
  });
16
16