Fixes bug not fetching mockup Tags.

This commit is contained in:
gkolokythas 2019-09-03 16:12:38 +03:00
parent 3fb82c65ea
commit bb32b4c6f4
2 changed files with 4 additions and 2 deletions

View File

@ -51,7 +51,8 @@ public class TagController extends BaseController {
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(remoteRepos);*/
ObjectMapper mapper = new ObjectMapper();
List<Map<String, String>> data = mapper.readValue(new File(this.environment.getProperty("dataset.tags.mock")), new TypeReference<List<Map<String, String>>>(){});
String fileUrl = this.environment.getProperty("configuration.resources.path") + this.environment.getProperty("dataset.tags.mock");
List<Map<String, String>> data = mapper.readValue(new File(fileUrl), new TypeReference<List<Map<String, String>>>(){});
TagExternalSourcesModel researchersExternalSourcesModel = new TagExternalSourcesModel().fromExternalItem(data);
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<TagExternalSourcesModel>().payload(researchersExternalSourcesModel).status(ApiMessageCode.NO_MESSAGE));

View File

@ -20,9 +20,10 @@ configuration.dynamicGrantUrl=/tmp/GrantConfiguration.xml
configuration.dynamicProjectUrl=/tmp/ProjectConfiguration.xml
configuration.dynamicFunderUrl=/tmp/FunderConfiguration.xml
configuration.h2020template=C:\\Users\\gkolokythas\\Documents\\openDmp\\dmp-backend\\web\\src\\main\\resources\\documents\\h2020.docx
configuration.resources.path =
####################MOCK FILES CONFIGURATIONS##########
dataset.tags.mock=/tmp/mockupTags.json
dataset.tags.mock=/mockupTags.json
#############TWITTER LOGIN CONFIGURATIONS#########
twitter.login.redirect_uri=http://127.0.0.1:4200/login/twitter