gomtm 0.0.296 → 0.0.298

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.
@@ -55,7 +55,7 @@ import { setCookie } from "mtxlib/clientlib";
55
55
  import { createContext, useContext, useRef } from "react";
56
56
  import { useStore } from "zustand";
57
57
  import { createStore } from "zustand/vanilla";
58
- import { CONST_cookieListViewLayout } from "../../consts";
58
+ import { CONST_cookieListViewLayout, MTM_API_PREFIX } from "../../consts";
59
59
  import { goMtmQueryFn } from "../../mtmFetcher";
60
60
  import { useGomtm } from "../../store/mtapp-store";
61
61
  const createListviewStore = (initProps) => {
@@ -80,12 +80,15 @@ const createListviewStore = (initProps) => {
80
80
  return set((state) => ({ layout }));
81
81
  },
82
82
  loadListData: () => __async(void 0, null, function* () {
83
+ const baseUrl = get().backendUrl || "";
84
+ const apiUrl = new URL(MTM_API_PREFIX, baseUrl).toString();
85
+ console.log("loadListData, apiUrl:", apiUrl);
83
86
  const data = yield goMtmQueryFn({
84
87
  svc: get().svc,
85
88
  method: get().methodList,
86
89
  input: get().paramsList,
87
90
  options: {
88
- url: get().backendUrl || ""
91
+ url: apiUrl
89
92
  }
90
93
  });
91
94
  set({ data });