@base44-preview/sdk 0.8.20-pr.141.01e370e → 0.8.20-pr.141.0b81b67

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.
@@ -76,12 +76,8 @@ export function createFunctionsModule(axios, appId) {
76
76
  async fetch(path, init = {}) {
77
77
  const normalizedPath = path.startsWith("/") ? path : `/${path}`;
78
78
  const primaryPath = `/functions${normalizedPath}`;
79
- const fallbackPath = `/apps/${appId}/functions${normalizedPath}`;
80
79
  const { data, ...fetchInit } = init;
81
80
  const headers = toHeaders(fetchInit.headers);
82
- if (!headers.has("X-App-Id")) {
83
- headers.set("X-App-Id", appId);
84
- }
85
81
  let body = fetchInit.body;
86
82
  if (body === undefined && data !== undefined) {
87
83
  if (data === null) {
@@ -93,9 +89,6 @@ export function createFunctionsModule(axios, appId) {
93
89
  }
94
90
  else {
95
91
  body = JSON.stringify(data);
96
- if (!headers.has("Content-Type")) {
97
- headers.set("Content-Type", "application/json");
98
- }
99
92
  }
100
93
  }
101
94
  const requestInit = {
@@ -103,10 +96,7 @@ export function createFunctionsModule(axios, appId) {
103
96
  headers,
104
97
  body,
105
98
  };
106
- let response = await fetch(joinBaseUrl(axios.defaults.baseURL, primaryPath), requestInit);
107
- if (response.status === 404) {
108
- response = await fetch(joinBaseUrl(axios.defaults.baseURL, fallbackPath), requestInit);
109
- }
99
+ const response = await fetch(joinBaseUrl(axios.defaults.baseURL, primaryPath), requestInit);
110
100
  return response;
111
101
  },
112
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.20-pr.141.01e370e",
3
+ "version": "0.8.20-pr.141.0b81b67",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",