DhroovSankla commented on code in PR #6017:
URL: https://github.com/apache/fineract/pull/6017#discussion_r3471882848
##########
fineract-mix/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java:
##########
@@ -44,12 +44,13 @@ public class MixReportApiResource {
@GET
@Produces({ MediaType.APPLICATION_XML })
@Operation(summary = "Retrieve Mix XBRL report", operationId =
"retrieveMixReport")
- public String retrieveXBRLReport(@QueryParam("startDate") final Date
startDate, @QueryParam("endDate") final Date endDate,
- @QueryParam("currency") final String currency) {
+ public jakarta.ws.rs.core.Response
retrieveXBRLReport(@QueryParam("startDate") final Date startDate,
+ @QueryParam("endDate") final Date endDate, @QueryParam("currency")
final String currency) {
final var data = xbrlResultService.getXBRLResult(startDate, endDate,
currency);
- // TODO: make this type safe?
- return this.xbrlBuilder.build(data);
+ String xmlPayload = this.xbrlBuilder.build(data);
+
+ return
jakarta.ws.rs.core.Response.ok().entity(xmlPayload).type(MediaType.APPLICATION_XML_TYPE).build();
Review Comment:
@oluexpert99 got it!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]