Fix new version url
This commit is contained in:
parent
c048d7047f
commit
e636baf4b8
|
@ -157,8 +157,8 @@ public class ZenodoDepositService implements RepositoryDeposit {
|
|||
links = (LinkedHashMap<String, String>) createResponse.getOrDefault(ZENODO_LINKS, new LinkedHashMap<>());
|
||||
|
||||
//Second, make the new version (not in the links?)
|
||||
if (!links.containsKey(ZENODO_LINKS_SELF)) throw new Exception("previousDOI not found");
|
||||
String newVersionUrl = links.get(ZENODO_LINKS_SELF) + "/actions/newversion" + "?access_token=" + zenodoToken;
|
||||
if (!links.containsKey(ZENODO_LINKS_LATEST_DRAFT)) throw new Exception("previousDOI not found");
|
||||
String newVersionUrl = links.get(ZENODO_LINKS_LATEST_DRAFT) + "/actions/newversion" + "?access_token=" + zenodoToken;
|
||||
logger.debug("new version url: " + newVersionUrl);
|
||||
createResponse = zenodoClient.post().uri(newVersionUrl)
|
||||
.bodyValue(null).exchangeToMono(mono -> mono.bodyToMono(new ParameterizedTypeReference<Map<String, LinkedHashMap<String, String>>>() {})).block();
|
||||
|
|
Loading…
Reference in New Issue