fix cli output token can not return token

This commit is contained in:
rokkiter 2023-05-16 10:12:18 +08:00 committed by Pedro Igor
parent f557b2c88c
commit c38fadcdec

View file

@ -385,8 +385,7 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
} }
if (outputResult) { if (outputResult) {
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null) && isGetByID(url)) {
if (isCreateOrUpdate() && (response.getStatusCode() == 204 || id != null)) {
// get object for id // get object for id
headers = new Headers(); headers = new Headers();
if (auth != null) { if (auth != null) {
@ -447,4 +446,8 @@ public abstract class AbstractRequestCmd extends AbstractAuthOptionsCmd {
private boolean isCreateOrUpdate() { private boolean isCreateOrUpdate() {
return "post".equals(httpVerb) || "put".equals(httpVerb); return "post".equals(httpVerb) || "put".equals(httpVerb);
} }
private boolean isGetByID(String url) {
return !"clients-initial-access".equals(url);
}
} }