zitejs 0.9.24 → 0.9.25
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.
|
@@ -26,13 +26,14 @@ function getToken() {
|
|
|
26
26
|
return (0, env_js_1.getEnv)('ZITE_DB_TOKEN', 'VITE_ZITE_DB_TOKEN') ?? '';
|
|
27
27
|
}
|
|
28
28
|
async function wrapSdkCall(integrationId, className, methodName, params) {
|
|
29
|
+
const mergedParams = { tableId: className, ...params };
|
|
29
30
|
const res = await fetch(`${getRunnerUrl()}/sdk/execute`, {
|
|
30
31
|
method: 'POST',
|
|
31
32
|
headers: {
|
|
32
33
|
Authorization: `Bearer ${getToken()}`,
|
|
33
34
|
'Content-Type': 'application/json',
|
|
34
35
|
},
|
|
35
|
-
body: JSON.stringify({ integrationId,
|
|
36
|
+
body: JSON.stringify({ integrationId, methodName, params: mergedParams }),
|
|
36
37
|
});
|
|
37
38
|
if (!res.ok) {
|
|
38
39
|
const text = await res.text().catch(() => '');
|
|
@@ -21,13 +21,14 @@ function getToken() {
|
|
|
21
21
|
return getEnv('ZITE_DB_TOKEN', 'VITE_ZITE_DB_TOKEN') ?? '';
|
|
22
22
|
}
|
|
23
23
|
export async function wrapSdkCall(integrationId, className, methodName, params) {
|
|
24
|
+
const mergedParams = { tableId: className, ...params };
|
|
24
25
|
const res = await fetch(`${getRunnerUrl()}/sdk/execute`, {
|
|
25
26
|
method: 'POST',
|
|
26
27
|
headers: {
|
|
27
28
|
Authorization: `Bearer ${getToken()}`,
|
|
28
29
|
'Content-Type': 'application/json',
|
|
29
30
|
},
|
|
30
|
-
body: JSON.stringify({ integrationId,
|
|
31
|
+
body: JSON.stringify({ integrationId, methodName, params: mergedParams }),
|
|
31
32
|
});
|
|
32
33
|
if (!res.ok) {
|
|
33
34
|
const text = await res.text().catch(() => '');
|