We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf79b4a commit 163e107Copy full SHA for 163e107
frontend/src/api/apiClient.ts
@@ -289,9 +289,9 @@ const sendAssistantMessage = async (
289
previousResponseId?: string,
290
) => {
291
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`, {
+ // The adminApi interceptor doesn't gracefully omit the JWT token if you're not authenticated
+ const api = localStorage.getItem("access") ? adminApi : publicApi;
+ const response = await api.post(`/v1/api/assistant`, {
295
message,
296
previous_response_id: previousResponseId,
297
});
0 commit comments