@iblai/data-layer 1.30.2 → 1.30.3

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/dist/index.esm.js CHANGED
@@ -43586,9 +43586,10 @@ const reportsApiSlice = createApi({
43586
43586
  async queryFn({ key, mentor_id }) {
43587
43587
  var _a, _b;
43588
43588
  try {
43589
- const baseUrl = getServiceUrl(SERVICES.DM);
43589
+ const baseUrl = getServiceUrl(SERVICES.DM).replace(/\/+$/, '');
43590
+ const dmBaseUrl = baseUrl.endsWith('/dm') ? baseUrl : `${baseUrl}/dm`;
43590
43591
  const authHeaders = await getHeaders(SERVICES.DM);
43591
- const url = new URL(`${baseUrl}/dm/api/reports/platforms/${encodeURIComponent(key)}/`);
43592
+ const url = new URL(`${dmBaseUrl}/api/reports/platforms/${encodeURIComponent(key)}/`);
43592
43593
  if (mentor_id) {
43593
43594
  url.searchParams.set('mentor_id', mentor_id);
43594
43595
  }