Index: src/main/groovy/com/lemans/correspondence/controllers/FormSubmitController.groovy =================================================================== diff -u -r05a738e378deddcf6dbe5b63365c89fe37f6eb96 -r7bd1000a98e60401332f1115b3b2fe4c22fff7ae --- src/main/groovy/com/lemans/correspondence/controllers/FormSubmitController.groovy (.../FormSubmitController.groovy) (revision 05a738e378deddcf6dbe5b63365c89fe37f6eb96) +++ src/main/groovy/com/lemans/correspondence/controllers/FormSubmitController.groovy (.../FormSubmitController.groovy) (revision 7bd1000a98e60401332f1115b3b2fe4c22fff7ae) @@ -3,6 +3,9 @@ import com.lemans.api.LeMansApiController import com.lemans.correspondence.services.DomainFormService import com.lemans.correspondence.services.FormSubmitService +import org.apache.logging.slf4j.SLF4JLogger +import org.slf4j.Logger +import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping @@ -23,9 +26,12 @@ @Autowired FormSubmitService formSubmitService + private static final Logger log = LoggerFactory.getLogger(FormSubmitController.class) + @PostMapping("/domain/{domainId}/form/{formKey}/submit") def add(@PathVariable Integer domainId, @PathVariable String formKey, @RequestHeader("Content-Type") String contentType, @RequestBody(required = false) Map input, @RequestParam(required = false) Map params) { Map formData = [:] + log.debug("domainId: ${domainId} formKey: ${formKey} contentType: ${contentType} input: ${input} params: ${params}") if (contentType.contains('multipart/form-data') || contentType.contains('application/x-www-form-urlencoded')) { formData = extractFormData(params) } else {