tangled
alpha
login
or
join now
cosmik.network
/
semble
43
fork
atom
A social knowledge tool for researchers built on ATProto
43
fork
atom
overview
issues
13
pulls
pipelines
use correct env var
Wesley Finck
4 months ago
73d89da8
b608c3c3
+5
-2
2 changed files
expand all
collapse all
unified
split
src
webapp
api-client
ApiClient.ts
lib
serverAuth.ts
+3
-1
src/webapp/api-client/ApiClient.ts
···
278
278
};
279
279
280
280
export const createServerApiClient = () => {
281
281
-
return new ApiClient(process.env.API_BASE_URL || 'http://127.0.0.1:3000');
281
281
+
return new ApiClient(
282
282
+
process.env.NEXT_PUBLIC_API_BASE_URL || 'http://127.0.0.1:3000',
283
283
+
);
282
284
};
283
285
284
286
// Default client instance for backward compatibility
+2
-1
src/webapp/lib/serverAuth.ts
···
20
20
}
21
21
22
22
// Make direct API call with cookie header for server-side
23
23
-
const baseUrl = process.env.API_BASE_URL || 'http://127.0.0.1:3000';
23
23
+
const baseUrl =
24
24
+
process.env.NEXT_PUBLIC_API_BASE_URL || 'http://127.0.0.1:3000';
24
25
const response = await fetch(`${baseUrl}/api/users/me`, {
25
26
method: 'GET',
26
27
headers: {