'GET', 'callback' => [$this, 'index'], 'permission_callback' => [Routes::class, 'canManage'], ], ]); } public function index(): WP_REST_Response { return new WP_REST_Response($this->milestones->read()); } }