@@ -64,15 +64,15 @@ pub fn create_consent_cookie(consent: &GdprConsent) -> String {
6464}
6565
6666pub fn handle_consent_request ( _settings : & Settings , req : Request ) -> Result < Response , Error > {
67- match req. get_method ( ) {
68- & Method :: GET => {
67+ match * req. get_method ( ) {
68+ Method :: GET => {
6969 // Return current consent status
7070 let consent = get_consent_from_request ( & req) . unwrap_or_default ( ) ;
7171 Ok ( Response :: from_status ( StatusCode :: OK )
7272 . with_header ( header:: CONTENT_TYPE , "application/json" )
7373 . with_body ( serde_json:: to_string ( & consent) ?) )
7474 }
75- & Method :: POST => {
75+ Method :: POST => {
7676 // Update consent preferences
7777 let consent: GdprConsent = serde_json:: from_slice ( req. into_body_bytes ( ) . as_slice ( ) ) ?;
7878 let mut response = Response :: from_status ( StatusCode :: OK )
@@ -90,8 +90,8 @@ pub fn handle_consent_request(_settings: &Settings, req: Request) -> Result<Resp
9090}
9191
9292pub fn handle_data_subject_request ( _settings : & Settings , req : Request ) -> Result < Response , Error > {
93- match req. get_method ( ) {
94- & Method :: GET => {
93+ match * req. get_method ( ) {
94+ Method :: GET => {
9595 // Handle data access request
9696 if let Some ( synthetic_id) = req. get_header ( "X-Subject-ID" ) {
9797 // Create a HashMap to store all user-related data
@@ -108,7 +108,7 @@ pub fn handle_data_subject_request(_settings: &Settings, req: Request) -> Result
108108 Ok ( Response :: from_status ( StatusCode :: BAD_REQUEST ) . with_body ( "Missing subject ID" ) )
109109 }
110110 }
111- & Method :: DELETE => {
111+ Method :: DELETE => {
112112 // Handle right to erasure (right to be forgotten)
113113 if let Some ( _synthetic_id) = req. get_header ( "X-Subject-ID" ) {
114114 // TODO: Implement data deletion from KV store
0 commit comments