@driveflux/api-swr 4.0.63 → 4.0.64

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.
@@ -1,5 +1,5 @@
1
1
  import { config } from '@driveflux/config/frontend';
2
- export var API_MODELS_URLS = {
2
+ export const API_MODELS_URLS = {
3
3
  Business: '/api/businesses',
4
4
  User: '/api/users',
5
5
  Inquiry: '/api/inquiries',
@@ -9,11 +9,14 @@ export var API_MODELS_URLS = {
9
9
  Subscription: '/api/subscriptions',
10
10
  Cycle: '/api/cycles',
11
11
  Invoice: '/api/invoices',
12
- SubscriptionReservation: '/api/reservations'
12
+ SubscriptionReservation: '/api/reservations',
13
13
  };
14
14
  export function getApiUrl(model) {
15
- if (model.startsWith('/api') || model.startsWith("".concat(config.apiUrl))) {
15
+ if (model.startsWith('/api') || model.startsWith(`${config.apiUrl}`)) {
16
16
  return model;
17
17
  }
18
- return model in API_MODELS_URLS ? API_MODELS_URLS[model] : "/api/".concat(model);
18
+ return model in API_MODELS_URLS
19
+ ? API_MODELS_URLS[model]
20
+ : `/api/${model}`;
19
21
  }
22
+ //# sourceMappingURL=api-models.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/api-swr",
3
- "version": "4.0.63",
3
+ "version": "4.0.64",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -16,9 +16,9 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@driveflux/auth": "4.0.63",
19
+ "@driveflux/auth": "4.0.64",
20
20
  "@driveflux/config": "3.0.9",
21
- "@driveflux/db": "4.0.38",
21
+ "@driveflux/db": "4.0.39",
22
22
  "@driveflux/fetch": "8.0.1",
23
23
  "@driveflux/problem": "6.0.1",
24
24
  "@driveflux/result": "6.0.1",