Skip to content

Commit

Permalink
fix(data-events): test endpoint success logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredrethman committed Jun 26, 2024
1 parent e564b5e commit a6569bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/data-events/class-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public static function test_url( $request ) {
}
return \rest_ensure_response(
[
'success' => $code && 200 >= $code && 300 > $code,
// Success if response code is in 2xx range.
'success' => $code && $code > 199 && $code < 300,
'code' => $code,
'message' => $message,
]
Expand Down

0 comments on commit a6569bc

Please sign in to comment.