We expect a 201 here.
This commit is contained in:
parent
5f71bde9c6
commit
5b7b40c2ef
2
.bashrc
2
.bashrc
|
@ -168,7 +168,7 @@ pasee()
|
||||||
local HTTP_RESPONSE="$(<$TEMP_DIR/stdout)"
|
local HTTP_RESPONSE="$(<$TEMP_DIR/stdout)"
|
||||||
local STATUS_CODE="$(<$TEMP_DIR/stderr)"
|
local STATUS_CODE="$(<$TEMP_DIR/stderr)"
|
||||||
JWT="$(jq -r ".access_token" <<< "$HTTP_RESPONSE")"
|
JWT="$(jq -r ".access_token" <<< "$HTTP_RESPONSE")"
|
||||||
if [[ -z "$JWT" || "$STATUS_CODE" != "200" || "$JWT" == "null" ]]; then
|
if [[ -z "$JWT" || "$STATUS_CODE" != "201" || "$JWT" == "null" ]]; then
|
||||||
printf "HTTP Error %s: %s\n" "$STATUS_CODE" "$HTTP_RESPONSE"
|
printf "HTTP Error %s: %s\n" "$STATUS_CODE" "$HTTP_RESPONSE"
|
||||||
fi
|
fi
|
||||||
AUTH="Authorization: Bearer $JWT"
|
AUTH="Authorization: Bearer $JWT"
|
||||||
|
|
Loading…
Reference in New Issue