chore: emqx_utils_api:with_node/2 support simple http-code
This commit is contained in:
parent
4d25f28bb2
commit
c61828460a
|
@ -73,5 +73,7 @@ handle_result({ok, Result}) ->
|
||||||
?OK(Result);
|
?OK(Result);
|
||||||
handle_result({error, Reason}) ->
|
handle_result({error, Reason}) ->
|
||||||
?BAD_REQUEST(Reason);
|
?BAD_REQUEST(Reason);
|
||||||
|
handle_result({HTTPCode}) when is_integer(HTTPCode) ->
|
||||||
|
{HTTPCode};
|
||||||
handle_result({HTTPCode, Content}) when is_integer(HTTPCode) ->
|
handle_result({HTTPCode, Content}) when is_integer(HTTPCode) ->
|
||||||
{HTTPCode, Content}.
|
{HTTPCode, Content}.
|
||||||
|
|
|
@ -4,6 +4,7 @@ set -eu
|
||||||
# shellcheck disable=SC1090,SC1091
|
# shellcheck disable=SC1090,SC1091
|
||||||
RUNNER_ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
|
RUNNER_ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
|
||||||
echo "Running node dump in ${RUNNER_ROOT_DIR}"
|
echo "Running node dump in ${RUNNER_ROOT_DIR}"
|
||||||
|
BASE_RUNNER_ROOT_DIR="${BASE_RUNNER_ROOT_DIR:-$RUNNER_ROOT_DIR}"
|
||||||
|
|
||||||
# shellcheck disable=SC1090,SC1091
|
# shellcheck disable=SC1090,SC1091
|
||||||
. "$RUNNER_ROOT_DIR"/releases/emqx_vars
|
. "$RUNNER_ROOT_DIR"/releases/emqx_vars
|
||||||
|
|
Loading…
Reference in New Issue