Added a reset for api key
This commit is contained in:
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
|
// Need to use sysadmin because the user could not have the right to modify the item
|
||||||
setApiKey(CKANUtility.getSysAdminAPI());
|
setApiKey(CKANUtility.getSysAdminAPI());
|
||||||
|
|
||||||
String ret = sendPostRequest(ITEM_UPDATE, getAsString(result));
|
String ret = sendPostRequest(ITEM_UPDATE, getAsString(result));
|
||||||
|
// Resetting the api key
|
||||||
|
setApiKey(null);
|
||||||
|
|
||||||
result = mapper.readTree(ret);
|
result = mapper.readTree(ret);
|
||||||
|
|
||||||
parseResult();
|
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
|
// Need to use sysadmin because the user could not have the right to modify the item
|
||||||
setApiKey(CKANUtility.getSysAdminAPI());
|
setApiKey(CKANUtility.getSysAdminAPI());
|
||||||
|
|
||||||
String ret = sendPostRequest(ITEM_PATCH, getAsString(result));
|
String ret = sendPostRequest(ITEM_PATCH, getAsString(result));
|
||||||
|
// Resetting the api key
|
||||||
|
setApiKey(null);
|
||||||
|
|
||||||
result = mapper.readTree(ret);
|
result = mapper.readTree(ret);
|
||||||
parseResult();
|
parseResult();
|
||||||
moderationThread.setItemCoordinates(itemID, name, itemTitle, itemURL);
|
moderationThread.setItemCoordinates(itemID, name, itemTitle, itemURL);
|
||||||
|
|
Loading…
Reference in New Issue