diff options
| -rw-r--r-- | app/api/files/[...path]/route.ts | 3 | ||||
| -rw-r--r-- | components/project/ProjectList.tsx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/api/files/[...path]/route.ts b/app/api/files/[...path]/route.ts index 8d736f80..83fe7ba2 100644 --- a/app/api/files/[...path]/route.ts +++ b/app/api/files/[...path]/route.ts @@ -53,7 +53,8 @@ const isAllowedPath = (requestedPath: string): boolean => { 'pq/vendor', 'information', 'general-contract-templates', - 'purchase-requests' + 'purchase-requests', + 'projects' ]; return allowedPaths.some(allowed => diff --git a/components/project/ProjectList.tsx b/components/project/ProjectList.tsx index 5c01070e..fbb0f42a 100644 --- a/components/project/ProjectList.tsx +++ b/components/project/ProjectList.tsx @@ -113,7 +113,9 @@ const fetchProjects = async () => { if (totalProjects.length === 1) { const singleProject = totalProjects[0]; - router.push(`/evcp/data-room/${singleProject.id}/files`); + const currentDomain = pathname?.includes('/partners') ? 'partners' : 'evcp'; + const lng = pathname?.split('/')[1]; + router.push(`/${lng}/${currentDomain}/data-room/${singleProject.id}/files`); } } catch (error) { toast({ |
