From e5e2fabb1decd8708d13d79d0c6d94a62638ed53 Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Tue, 24 Mar 2026 21:46:37 +0200 Subject: [PATCH] =?UTF-8?q?fix(rgi):=20correct=20download=20flow=20?= =?UTF-8?q?=E2=80=94=20confirmOnView=20+=20downloadFile=20by=20documentPk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The download uses documentPk (not documentTypeId) as the file identifier: 1. confirmOnView/{wid}/{appId}/{documentPk} — confirm view 2. loadDocument/downloadFile/{wid}/{documentPk} — actual download Removed fileVisibility step (not needed, was causing 404). Updated page download links to pass documentPk. 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 | 50 +++++--------------- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/src/app/(modules)/rgi-test/page.tsx b/src/app/(modules)/rgi-test/page.tsx index c79d803..e269244 100644 --- a/src/app/(modules)/rgi-test/page.tsx +++ b/src/app/(modules)/rgi-test/page.tsx @@ -296,7 +296,7 @@ function IssuedDocsPanel({