feat(sdk): Replace mock data with real API calls in consent, DSR, and consent-management
- /sdk/consent: Replace hardcoded mockDocuments with GET /api/admin/consent/documents - /sdk/dsr: Replace createMockDSRList with fetchSDKDSRList via /api/sdk/v1/dsgvo/dsr - /sdk/dsr/new: Replace console.log mock with real POST to create DSR requests - /sdk/dsr/[requestId]: Replace mock lookup with real GET/PUT for DSR details and status updates - /sdk/consent-management: Add real stats, GDPR process counts, and email template editor - lib/sdk/dsr/api.ts: Add transformBackendDSR adapter (flat backend → nested frontend types) Prepares for removal of /dsgvo and /compliance pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
DSR_TYPE_INFO,
|
||||
DSRCreateRequest
|
||||
} from '@/lib/sdk/dsr/types'
|
||||
import { createSDKDSR } from '@/lib/sdk/dsr/api'
|
||||
|
||||
// =============================================================================
|
||||
// TYPES
|
||||
@@ -249,11 +250,7 @@ export default function NewDSRPage() {
|
||||
priority: formData.priority
|
||||
}
|
||||
|
||||
// In production: await createDSR(request)
|
||||
console.log('Creating DSR:', request)
|
||||
|
||||
// Simulate API call
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
await createSDKDSR(request)
|
||||
|
||||
// Redirect to DSR list
|
||||
router.push('/sdk/dsr')
|
||||
|
||||
Reference in New Issue
Block a user