Hi,
I’m trying to create new routes to the API, but I couldn’t get this working.
I made all the API client setup right, but when I tried to create new route, I get 401 error.
The same errors happens if I change any route name.
I could get working on version 6, but not at the version 7. Please some one help.
The code:
"GET /api/facility" => function () {
RestConfig::scope_check("user", "facility", "read");
RestConfig::authorization_check("admin", "users");
$return = (new FacilityRestController())->getAll($_GET);
RestConfig::apiLog($return);
return $return;
},
this is an default one and workfine, but if I change to GET /api/facilit
just to test, I got the 401 response instead the 200.