Commit 04926eae authored by Matija Obreza's avatar Matija Obreza

institutes: CSV support for WIEWS institute list

parent bb95e5eb
......@@ -47,6 +47,7 @@ import org.genesys2.server.service.filter.InstituteFilter;
import org.genesys2.server.service.filter.SubsetFilter;
import org.genesys2.server.service.impl.SearchException;
import org.genesys2.server.service.worker.AccessionAuditLogDownload;
import org.genesys2.spring.CSVMessageConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -117,7 +118,7 @@ public class InstituteController {
* @return the page
* @throws IOException
*/
@PostMapping(value = "/list", produces = { MediaType.APPLICATION_JSON_VALUE })
@PostMapping(value = "/list", produces = { MediaType.APPLICATION_JSON_VALUE, CSVMessageConverter.TEXT_CSV_VALUE })
@JsonView({ JsonViews.Public.class })
public FilteredPage<FaoInstitute> list(@RequestParam(name = "f", required = false) String filterCode, final Pagination page,
@RequestBody(required = false) InstituteFilter filter) throws IOException {
......
......@@ -44,6 +44,7 @@ import org.genesys2.server.service.filter.InstituteFilter;
import org.genesys2.server.service.filter.SubsetFilter;
import org.genesys2.server.service.impl.SearchException;
import org.genesys2.server.service.worker.AccessionAuditLogDownload;
import org.genesys2.spring.CSVMessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
......@@ -109,7 +110,7 @@ public class InstituteController extends ApiBaseController {
* @return the page
* @throws IOException
*/
@PostMapping(value = "/list", produces = { MediaType.APPLICATION_JSON_VALUE })
@PostMapping(value = "/list", produces = { MediaType.APPLICATION_JSON_VALUE, CSVMessageConverter.TEXT_CSV_VALUE })
@JsonView({ JsonViews.Public.class })
public FilteredPage<FaoInstitute> list(@RequestParam(name = "f", required = false) String filterCode, final Pagination page,
@RequestBody(required = false) InstituteFilter filter) throws IOException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment