=== Test API Notification Consent === Dati di test: { "user_id": 1, "push_notifications_enabled": true, "email_notifications_enabled": false } Endpoint API disponibili: 1. GET /api/notification-consent - Recupera i consensi attuali 2. PUT /api/notification-consent - Aggiorna entrambi i consensi 3. PATCH /api/notification-consent/push - Aggiorna solo consenso push 4. PATCH /api/notification-consent/email - Aggiorna solo consenso email Esempi di utilizzo: 1. Recuperare i consensi attuali: curl -X GET 'http://localhost/api/notification-consent' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' \ -H 'Content-Type: application/json' 2. Aggiornare entrambi i consensi: curl -X PUT 'http://localhost/api/notification-consent' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "push_notifications_enabled": true, "email_notifications_enabled": false }' 3. Aggiornare solo il consenso push: curl -X PATCH 'http://localhost/api/notification-consent/push' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "enabled": true }' 4. Aggiornare solo il consenso email: curl -X PATCH 'http://localhost/api/notification-consent/email' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "enabled": false }' Risposte attese: GET /api/notification-consent: { "success": true, "data": { "push_notifications_enabled": true, "email_notifications_enabled": false } } PUT /api/notification-consent: { "success": true, "message": "Consensi aggiornati con successo.", "data": { "push_notifications_enabled": true, "email_notifications_enabled": false } } PATCH /api/notification-consent/push: { "success": true, "message": "Consenso notifiche push aggiornato con successo.", "data": { "push_notifications_enabled": true } } PATCH /api/notification-consent/email: { "success": true, "message": "Consenso notifiche email aggiornato con successo.", "data": { "email_notifications_enabled": false } } === Test completato ===