This commit is contained in:
2026-04-01 20:15:45 +02:00
parent 92b7a2a95e
commit 9b36f8fec3
35 changed files with 2371 additions and 31 deletions

View File

@@ -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 ) ) {