Update template.

This commit is contained in:
Hoang Huu
2019-10-08 17:18:48 +07:00
parent 7c953687ae
commit 7b67843a52
2 changed files with 34 additions and 31 deletions

View File

@@ -94,6 +94,24 @@ class Opalestate_Property_Api extends Opalestate_Base_API {
// ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->base . '/search/',
[
'args' => [
'id' => [
'description' => __( 'Unique identifier for the resource.', 'opalestate-pro' ),
'type' => 'integer',
],
],
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_results' ],
// 'permission_callback' => [ $this, 'get_item_permissions_check' ],
],
]
);
}
/**