refactor: update API endpoint paths to remove trailing slashes

- Modified various FastAPI route definitions to remove trailing slashes for consistency across the application.
- Updated corresponding fetch calls in the frontend to align with the new endpoint structure.
- Ensured that all affected routes maintain their functionality without trailing slashes.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-10-31 01:33:01 -07:00
parent 170b3cb167
commit ecd07d6155
41 changed files with 191 additions and 148 deletions

View file

@ -160,7 +160,7 @@ export function useDocuments(searchSpaceId: number, options?: UseDocumentsOption
}
const response = await fetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents/search/?${params.toString()}`,
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents/search?${params.toString()}`,
{
headers: {
Authorization: `Bearer ${localStorage.getItem("surfsense_bearer_token")}`,
@ -229,7 +229,7 @@ export function useDocuments(searchSpaceId: number, options?: UseDocumentsOption
});
const response = await fetch(
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents/type-counts/?${params.toString()}`,
`${process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL}/api/v1/documents/type-counts?${params.toString()}`,
{
headers: {
Authorization: `Bearer ${localStorage.getItem("surfsense_bearer_token")}`,