Skip to content

Commit 91d0848

Browse files
committed
fix merge issue
1 parent c1ea5ac commit 91d0848

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/main/java/org/breedinginsight/brapi/v2/BrAPIGermplasmController.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -221,25 +221,6 @@ public HttpResponse<Response<DataResponse<List<BrAPIGermplasm>>>> getGermplasm(
221221
return HttpResponse.status(HttpStatus.UNPROCESSABLE_ENTITY, "Error parsing requested date format");
222222
}
223223
}
224-
@Get("/programs/{programId}/germplasm/lists/{listDbId}/export{?fileExtension}")
225-
@Produces(value = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
226-
@ProgramSecured(roleGroups = {ProgramSecuredRoleGroup.PROGRAM_SCOPED_ROLES})
227-
public HttpResponse<StreamedFile> germplasmListExport(
228-
@PathVariable("programId") UUID programId, @PathVariable("listDbId") String listDbId, @QueryValue(defaultValue = "XLSX") String fileExtension) {
229-
String downloadErrorMessage = "An error occurred while generating the download file. Contact the development team at bidevteam@cornell.edu.";
230-
try {
231-
FileType extension = Enum.valueOf(FileType.class, fileExtension);
232-
DownloadFile germplasmListFile = germplasmService.exportGermplasmList(programId, listDbId, extension);
233-
HttpResponse<StreamedFile> germplasmListExport = HttpResponse.ok(germplasmListFile.getStreamedFile()).header(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename="+germplasmListFile.getFileName()+extension.getExtension());
234-
return germplasmListExport;
235-
}
236-
catch (Exception e) {
237-
log.info(e.getMessage(), e);
238-
e.printStackTrace();
239-
HttpResponse response = HttpResponse.status(HttpStatus.INTERNAL_SERVER_ERROR, downloadErrorMessage).contentType(MediaType.TEXT_PLAIN).body(downloadErrorMessage);
240-
return response;
241-
}
242-
}
243224

244225
@Get("/programs/{programId}/germplasm/lists/{listDbId}/export{?fileExtension}")
245226
@Produces(value = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")

0 commit comments

Comments
 (0)