Jack Davis
Member
Hello,
I'm trying to extend the API to provide some further integration with our own site, and I'm running into a few issues.
I get this error when trying to access the route.
Here is the controller
The class extension:
The class hint:
The route file generated:
Any help would be great.
I'm trying to extend the API to provide some further integration with our own site, and I'm running into a few issues.
I get this error when trying to access the route.
JSON:
{
"errors": [
{
"code": "endpoint_not_found",
"message": "Requested endpoint cannot be found.",
"params": {
"reason": "invalid_route",
"debug_reason": "invalid_controller",
"debug_controller": "RCRP\\API:User",
"debug_action": null
}
}
]
}
Here is the controller
PHP:
<?php
namespace RCRP\API\XF\Api\Controller;
use XF\Mvc\ParameterBag;
class User extends XFCP_User {
public function actionGet(ParameterBag $parameterBag) {
return $this->apiResult([
'test' => true
]);
}
}
The class extension:
JSON:
{
"from_class": "XF\\Api\\Controller\\AbstractController",
"to_class": "RCRP\\API\\XF\\Api\\Controller\\User",
"execute_order": 10,
"active": true
}
The class hint:
PHP:
<?php
// ################## THIS IS A GENERATED FILE ##################
// DO NOT EDIT DIRECTLY. EDIT THE CLASS EXTENSIONS IN THE CONTROL PANEL.
namespace RCRP\API\XF\Api\Controller
{
class XFCP_User extends \XF\Api\Controller\AbstractController {}
}
The route file generated:
JSON:
{
"route_type": "api",
"route_prefix": "rcrp",
"sub_name": "",
"format": "",
"build_class": "",
"build_method": "",
"controller": "RCRP\\API:User",
"context": "",
"action_prefix": ""
}
Any help would be great.