From d780c3c9737ae074ddfc822070ac203d283f6778 Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Tue, 24 Mar 2026 22:13:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(rgi):=20diagnostic=20download=20route=20?= =?UTF-8?q?=E2=80=94=20tries=20multiple=20URL=20patterns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Download route now: - Calls fileVisibility with documentTypeId (if provided) - Calls confirmOnView with documentPk - Tries 3 different download URL patterns until one works - Add &debug=1 to see diagnostic results instead of downloading - Page now passes documentTypeId in download link Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/(modules)/rgi-test/page.tsx | 2 +- src/app/api/eterra/rgi/download-doc/route.ts | 111 +++++++++++++++---- 2 files changed, 89 insertions(+), 24 deletions(-) diff --git a/src/app/(modules)/rgi-test/page.tsx b/src/app/(modules)/rgi-test/page.tsx index 0e3131f..4edc431 100644 --- a/src/app/(modules)/rgi-test/page.tsx +++ b/src/app/(modules)/rgi-test/page.tsx @@ -296,7 +296,7 @@ function IssuedDocsPanel({