using metadata_id on get item of item-metadata-controller to be same as update for now

This commit is contained in:
Jacson Passold 2018-03-01 15:23:22 -03:00
parent 6de7c87557
commit aff09b7b7e
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class TAINACAN_REST_Item_Metadata_Controller extends TAINACAN_REST_Controller {
)
)
);
register_rest_route($this->namespace, '/item/(?P<item_id>[\d]+)/'. $this->rest_base. '/(?P<field_id>[\d]+)',
register_rest_route($this->namespace, '/item/(?P<item_id>[\d]+)/'. $this->rest_base. '/(?P<metadata_id>[\d]+)',
array(
array(
'methods' => WP_REST_Server::READABLE,
@ -132,7 +132,7 @@ class TAINACAN_REST_Item_Metadata_Controller extends TAINACAN_REST_Controller {
*/
public function get_item_field_value( $request ) {
$item_id = $request['item_id'];
$field_id = $request['field_id'];
$field_id = $request['metadata_id'];
$item = $this->item_repository->fetch($item_id);