fix cli output token can not return token
This commit is contained in:
parent
f557b2c88c
commit
c38fadcdec
1 changed files with 5 additions and 2 deletions
|
@ -385,8 +385,7 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
|
|||
}
|
||||
|
||||
if (outputResult) {
|
||||
|
||||
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null)) {
|
||||
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null) && isGetByID(url)) {
|
||||
// get object for id
|
||||
headers = new Headers();
|
||||
if (auth != null) {
|
||||
|
@ -447,4 +446,8 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
|
|||
private boolean isCreateOrUpdate() {
|
||||
return "post".equals(httpVerb) || "put".equals(httpVerb);
|
||||
}
|
||||
|
||||
private boolean isGetByID(String url) {
|
||||
return !"clients-initial-access".equals(url);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue