update
This commit is contained in:
@@ -117,6 +117,13 @@ class Carei_REST_Proxy {
|
||||
),
|
||||
) );
|
||||
|
||||
// GET /branches-full (cached, full branch objects with descriptions)
|
||||
register_rest_route( self::NAMESPACE, '/branches-full', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => array( $this, 'get_branches_full' ),
|
||||
'permission_callback' => '__return_true',
|
||||
) );
|
||||
|
||||
// GET /agreements
|
||||
register_rest_route( self::NAMESPACE, '/agreements', array(
|
||||
'methods' => 'GET',
|
||||
@@ -276,6 +283,14 @@ class Carei_REST_Proxy {
|
||||
) );
|
||||
}
|
||||
|
||||
public function get_branches_full( WP_REST_Request $request ) {
|
||||
$api = $this->api();
|
||||
if ( is_wp_error( $api ) ) {
|
||||
return $api;
|
||||
}
|
||||
return $this->respond( $api->get_branches_cached() );
|
||||
}
|
||||
|
||||
public function get_agreements( WP_REST_Request $request ) {
|
||||
$api = $this->api();
|
||||
if ( is_wp_error( $api ) ) {
|
||||
|
||||
Reference in New Issue
Block a user