diff --git a/backend/src/handlers.rs b/backend/src/handlers.rs index 805c99d..4d03648 100644 --- a/backend/src/handlers.rs +++ b/backend/src/handlers.rs @@ -49,13 +49,14 @@ pub async fn get_forms(db: web::Data>>) -> impl Responder // Submit a form pub async fn submit_form( - db: web::Data>>, + db: web::Data>>, path: web::Path, - submission: web::Json, + submission: web::Form, ) -> impl Responder { let conn = db.lock().unwrap(); // Lock the Mutex to access the database let submission_id = Uuid::new_v4().to_string(); let form_id = path.into_inner(); + let submission_json = serde_json::to_string(&submission.into_inner()).unwrap(); match conn.execute(