Use object instead of array to retain keys for multi array POST via API
This commit is contained in:
@@ -239,7 +239,7 @@ class SP_REST_API {
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||
'schema' => array(
|
||||
'description' => __( 'Box Score', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'type' => 'object',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
'sanitize_callback' => 'rest_sanitize_request_arg',
|
||||
@@ -445,7 +445,7 @@ class SP_REST_API {
|
||||
'update_callback' => 'SP_REST_API::update_post_meta_arrays_multi',
|
||||
'schema' => array(
|
||||
'description' => __( 'Statistics', 'sportspress' ),
|
||||
'type' => 'array',
|
||||
'type' => 'object',
|
||||
'context' => array( 'view', 'edit' ),
|
||||
'arg_options' => array(
|
||||
'sanitize_callback' => 'rest_sanitize_request_arg',
|
||||
|
||||
Reference in New Issue
Block a user