Added a reset for api key

migrating_to_smartgears_4
Luca Frosini 2 years ago
parent 1ccec24890
commit e198f1a089

@ -1345,8 +1345,10 @@ public class CKANPackage extends CKAN implements Moderated {
// Need to use sysadmin because the user could not have the right to modify the item
setApiKey(CKANUtility.getSysAdminAPI());
String ret = sendPostRequest(ITEM_UPDATE, getAsString(result));
// Resetting the api key
setApiKey(null);
result = mapper.readTree(ret);
parseResult();
@ -1396,8 +1398,10 @@ public class CKANPackage extends CKAN implements Moderated {
// Need to use sysadmin because the user could not have the right to modify the item
setApiKey(CKANUtility.getSysAdminAPI());
String ret = sendPostRequest(ITEM_PATCH, getAsString(result));
// Resetting the api key
setApiKey(null);
result = mapper.readTree(ret);
parseResult();
moderationThread.setItemCoordinates(itemID, name, itemTitle, itemURL);

Loading…
Cancel
Save