From 842e3ce7e8525d9848a91c6387af4a8a6e482ce0 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 18 Mar 2021 13:58:02 +0900 Subject: [PATCH] Use object instead of array to retain team IDs when updating event results via API --- includes/api/class-sp-rest-api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/class-sp-rest-api.php b/includes/api/class-sp-rest-api.php index 859b5a3c..34f66263 100644 --- a/includes/api/class-sp-rest-api.php +++ b/includes/api/class-sp-rest-api.php @@ -223,7 +223,7 @@ class SP_REST_API { 'update_callback' => 'SP_REST_API::update_post_meta_arrays', 'schema' => array( 'description' => __( 'Results', 'sportspress' ), - 'type' => 'array', + 'type' => 'object', 'context' => array( 'view', 'edit' ), 'arg_options' => array( 'sanitize_callback' => 'rest_sanitize_request_arg',