Skip to content

Commit 5462354

Browse files
committed
feat: change apiEndpoint
1 parent 490ac3b commit 5462354

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

cloud-config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export const fetchAllConfigs = async (
178178
accessToken: undefined,
179179
cache: "default",
180180
apiPrefix: CLOUD_CONFIG_API_ENDPOINT,
181-
cacheSeconds: 60,
181+
// cacheSeconds: 60,
182182
}
183183
) => {
184184
try {
@@ -189,7 +189,7 @@ export const fetchAllConfigs = async (
189189

190190
const apiEndpoint = serverSide
191191
? `${apiPrefix}/server-config`
192-
: `${apiPrefix}/client-config?orgId=${orgId}`;
192+
: `${apiPrefix}/client-config/org-${orgId}`;
193193

194194
const requestData = serverSide
195195
? JSON.stringify({ orgId, accessToken })
@@ -201,12 +201,11 @@ export const fetchAllConfigs = async (
201201
headers: {
202202
"Content-Type": "application/json",
203203
},
204-
cache: cache,
204+
cache: cacheSeconds !== undefined ? undefined : cache,
205205
next: { revalidate: cacheSeconds },
206206
};
207207

208208
const response = await fetch(apiEndpoint, fetchInit);
209-
210209
if (!response.ok) {
211210
console.log("🚀 Debug fetchAllConfigs requestData:", requestData);
212211

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloud-configuration",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "This package allows you to use CloudConfig easily.",
55
"author": "Alex Zeng",
66
"license": "MIT",

0 commit comments

Comments
 (0)