diff --git a/admin-compliance/app/api/sdk/v1/dsms/[[...path]]/route.ts b/admin-compliance/app/api/sdk/v1/dsms/[[...path]]/route.ts new file mode 100644 index 0000000..546d019 --- /dev/null +++ b/admin-compliance/app/api/sdk/v1/dsms/[[...path]]/route.ts @@ -0,0 +1,22 @@ +/** + * DSMS Gateway Proxy — forwards verify/history requests to dsms-gateway. + */ +import { NextRequest, NextResponse } from 'next/server' + +const DSMS_URL = process.env.DSMS_GATEWAY_URL || 'http://dsms-gateway:8082' + +export async function GET(request: NextRequest, { params }: { params: Promise<{ path: string[] }> }) { + const { path } = await params + const target = `${DSMS_URL}/api/v1/${path.join('/')}` + + try { + const resp = await fetch(target, { + headers: { Authorization: 'Bearer system-frontend' }, + signal: AbortSignal.timeout(15000), + }) + const data = await resp.json() + return NextResponse.json(data, { status: resp.status }) + } catch { + return NextResponse.json({ error: 'DSMS not available' }, { status: 503 }) + } +} diff --git a/admin-compliance/app/sdk/gap-analysis/_components/GapDashboard.tsx b/admin-compliance/app/sdk/gap-analysis/_components/GapDashboard.tsx index 5201cb7..2f395bf 100644 --- a/admin-compliance/app/sdk/gap-analysis/_components/GapDashboard.tsx +++ b/admin-compliance/app/sdk/gap-analysis/_components/GapDashboard.tsx @@ -3,6 +3,7 @@ import React, { useState } from 'react' interface GapReport { + dsms_cid?: string profile_name: string regulations: Array<{ id: string @@ -79,6 +80,20 @@ export function GapDashboard({ report, onBack }: Props) { ← Neue Analyse + {/* DSMS Archive Badge */} + {report.dsms_cid && ( +
+ {report.dsms_cid.length > 20 ? report.dsms_cid.slice(0, 8) + '...' + report.dsms_cid.slice(-6) : report.dsms_cid}
+
+ DSMS/IPFS
+