fix: Docs & Chats in other search spaces

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-04-17 23:19:56 -07:00
parent 73623aa37e
commit 2008b07304
6 changed files with 32 additions and 21 deletions

View file

@ -22,7 +22,7 @@ export function useDocuments(searchSpaceId: number) {
try {
setLoading(true);
const response = await fetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents`,
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents?search_space_id=${searchSpaceId}`,
{
headers: {
Authorization: `Bearer ${localStorage.getItem('surfsense_bearer_token')}`,
@ -57,7 +57,7 @@ export function useDocuments(searchSpaceId: number) {
setLoading(true);
try {
const response = await fetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents`,
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents?search_space_id=${searchSpaceId}`,
{
headers: {
Authorization: `Bearer ${localStorage.getItem('surfsense_bearer_token')}`,