Skip to content

Commit 163e107

Browse files
committed
Address the user tracking issue without a 401 error
1 parent bf79b4a commit 163e107

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/src/api/apiClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ const sendAssistantMessage = async (
289289
previousResponseId?: string,
290290
) => {
291291
try {
292-
// The adminApi interceptor will automatically include your JWT token
293-
// if you're authenticated, and gracefully omit it if you're not
294-
const response = await adminApi.post(`/v1/api/assistant`, {
292+
// The adminApi interceptor doesn't gracefully omit the JWT token if you're not authenticated
293+
const api = localStorage.getItem("access") ? adminApi : publicApi;
294+
const response = await api.post(`/v1/api/assistant`, {
295295
message,
296296
previous_response_id: previousResponseId,
297297
});

0 commit comments

Comments
 (0)