(plugin) apps::controlm::restapi - fix endpoints (#4272)

This commit is contained in:
qgarnier 2023-03-09 08:31:44 +00:00 committed by David Boucher
parent 8a474f6c76
commit 0235b5c40d
1 changed files with 3 additions and 3 deletions

View File

@ -145,7 +145,7 @@ sub get_token {
$self->settings();
my $content = $self->{http}->request(
method => 'POST',
url_path => '/session/login',
url_path => '/automation-api/session/login',
query_form_post => $encoded,
unknown_status => $self->{unknown_http_status},
warning_status => $self->{warning_http_status},
@ -193,7 +193,7 @@ sub request_api {
$self->settings();
my $token = $self->get_token();
my ($content) = $self->{http}->request(
url_path => $options{endpoint},
url_path => '/automation-api' . $options{endpoint},
get_param => $get_param,
header => ['Authorization: Bearer ' . $token],
unknown_status => '',
@ -206,7 +206,7 @@ sub request_api {
$self->clean_token();
$token = $self->get_token();
$content = $self->{http}->request(
url_path => $options{endpoint},
url_path => '/automation-api' . $options{endpoint},
get_param => $get_param,
header => ['Authorization: Bearer ' . $token],
unknown_status => $self->{unknown_http_status},