api
This commit is contained in:
parent
ec62cc04cc
commit
c09a4bc335
@ -155,14 +155,17 @@ post_update_to_api() {
|
|||||||
local status="${1:-failed}"
|
local status="${1:-failed}"
|
||||||
local exit_code="${2:-0}"
|
local exit_code="${2:-0}"
|
||||||
local error_description="$(get_error_description "$exit_code")"
|
local error_description="$(get_error_description "$exit_code")"
|
||||||
|
|
||||||
local API_URL="http://api.community-scripts.org/dev/upload/updatestatus"
|
local API_URL="http://api.community-scripts.org/dev/upload/updatestatus"
|
||||||
|
local error="${exit_code}: ${error_description}"
|
||||||
|
|
||||||
|
if [ -z "$error" ]; then
|
||||||
|
error="Unknown error"
|
||||||
|
fi
|
||||||
|
|
||||||
JSON_PAYLOAD=$(cat <<EOF
|
JSON_PAYLOAD=$(cat <<EOF
|
||||||
{
|
{
|
||||||
"status": "$status",
|
"status": "$status",
|
||||||
"error_code": "$exit_code",
|
"error": "$error",
|
||||||
"error_message": "$error_description",
|
|
||||||
"random_id": "$RANDOM_UUID"
|
"random_id": "$RANDOM_UUID"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user