change Citycom OAN Api Helper updateService() to get only single service before update

This commit is contained in:
Frank Schubert
2026-02-11 14:23:01 +01:00
parent 4b72e3a678
commit aa03f29d8f
2 changed files with 31 additions and 2 deletions

View File

@@ -177,6 +177,33 @@ class Citycom_OanApiClient {
}
public function getService($service_id) {
if(!$this->token) {
$this->getAuthToken();
if(!$this->token) {
return false;
}
}
//$url = $this->baseurl.CITYCOM_OAN_API_EP_GET_SERVICES;
$url = str_replace("{service_id}", $service_id, $this->baseurl.CITYCOM_OAN_API_EP_GET_SERVICE);
$ctx_options = [
"http" => [
"ignore_errors" => true,
"method" => "GET",
"header" => [
"Accept: application/json",
"Authorization: Bearer ".$this->token,
],
]
];
$service = $this->runApiRequest($url, $ctx_options);
return $service;
}
public function createService($data) {
if(!$this->token) {
$this->getAuthToken();