diff --git a/src/main/java/com/tarento/formservice/controllers/FormsController.java b/src/main/java/com/tarento/formservice/controllers/FormsController.java index aba07d5655738ac31dea2917d9e16b1b9703c8c7..542db9d9298dabfe873b6b3316dafe5807ea3ad9 100644 --- a/src/main/java/com/tarento/formservice/controllers/FormsController.java +++ b/src/main/java/com/tarento/formservice/controllers/FormsController.java @@ -40,7 +40,6 @@ import com.tarento.formservice.model.Status; import com.tarento.formservice.model.UserInfo; import com.tarento.formservice.models.Form; import com.tarento.formservice.models.FormDetail; -import com.tarento.formservice.models.InstituteFormDataRequest; import com.tarento.formservice.service.FormsService; import com.tarento.formservice.utils.Constants; import com.tarento.formservice.utils.PathRoutes; @@ -488,9 +487,9 @@ public class FormsController { } @GetMapping(value = PathRoutes.FormServiceApi.GET_INSTITUTE_FORM_DATA_EXCEL) - public ResponseEntity<Resource> getFile(@RequestBody InstituteFormDataRequest instituteFormDataRequest) { + public ResponseEntity<Resource> getFile(@RequestParam(value = Constants.ORG_ID, required = true) Long orgId) { String filename = "institute.xlsx"; - InputStreamResource file = new InputStreamResource(formsService.getInstituteFormData(instituteFormDataRequest.getOrgId())); + InputStreamResource file = new InputStreamResource(formsService.getInstituteFormData(orgId)); return ResponseEntity.ok() .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) diff --git a/src/main/java/com/tarento/formservice/models/InstituteFormDataRequest.java b/src/main/java/com/tarento/formservice/models/InstituteFormDataRequest.java deleted file mode 100644 index 43b19c0fc326b982c91eeea1c5c460837510b74b..0000000000000000000000000000000000000000 --- a/src/main/java/com/tarento/formservice/models/InstituteFormDataRequest.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.tarento.formservice.models; - -import lombok.Data; - -@Data -public class InstituteFormDataRequest { - - private Long orgId; - -} diff --git a/src/main/java/com/tarento/formservice/utils/Constants.java b/src/main/java/com/tarento/formservice/utils/Constants.java index 0efbb9fc3202b56b529bbd60b5852cc750ea11c4..095d3b8f57827f39d75cdefb41f6c41042423d8c 100644 --- a/src/main/java/com/tarento/formservice/utils/Constants.java +++ b/src/main/java/com/tarento/formservice/utils/Constants.java @@ -103,6 +103,7 @@ public interface Constants { public static final String UP_SMF = "up-smf"; public static final String _ID = "_id"; public static final String ID = "id"; + public static final String ORG_ID = "orgId"; public static final String FORM_ID = "formId"; public static final String APPLICATION_ID = "applicationId"; public static final String STATUS = "status";