Spaceship: valid api response

This commit is contained in:
Meo597 committed 2025-04-15 21:02:46 +08:00
1 parent e55a54f3d4
commit 827315e059
1 file changed
+14 -2
+14 -2
View File
@@ -195,6 +195,18 @@ _spaceship_api_request() {
return 1
fi
_debug "API response: $response"
return 0
_debug "API response body: $response"
if [ "$method" = "GET" ]; then
if _contains "$(_head_n 1 <"$HTTP_HEADER")" '200'; then
return 0
fi
else
if _contains "$(_head_n 1 <"$HTTP_HEADER")" '204'; then
return 0
fi
fi
_debug "API response header: $HTTP_HEADER"
return 1
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.