chore: emqx_utils_api:with_node/2 support simple http-code

This commit is contained in:
Shawn 2024-07-19 14:38:55 +08:00
parent 4d25f28bb2
commit c61828460a
2 changed files with 3 additions and 0 deletions

View File

@ -73,5 +73,7 @@ handle_result({ok, Result}) ->
?OK(Result);
handle_result({error, Reason}) ->
?BAD_REQUEST(Reason);
handle_result({HTTPCode}) when is_integer(HTTPCode) ->
{HTTPCode};
handle_result({HTTPCode, Content}) when is_integer(HTTPCode) ->
{HTTPCode, Content}.

View File

@ -4,6 +4,7 @@ set -eu
# shellcheck disable=SC1090,SC1091
RUNNER_ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
echo "Running node dump in ${RUNNER_ROOT_DIR}"
BASE_RUNNER_ROOT_DIR="${BASE_RUNNER_ROOT_DIR:-$RUNNER_ROOT_DIR}"
# shellcheck disable=SC1090,SC1091
. "$RUNNER_ROOT_DIR"/releases/emqx_vars