(plugin) apps::controlm::restapi - fix endpoints (#4272)
This commit is contained in:
parent
8a474f6c76
commit
0235b5c40d
|
@ -145,7 +145,7 @@ sub get_token {
|
||||||
$self->settings();
|
$self->settings();
|
||||||
my $content = $self->{http}->request(
|
my $content = $self->{http}->request(
|
||||||
method => 'POST',
|
method => 'POST',
|
||||||
url_path => '/session/login',
|
url_path => '/automation-api/session/login',
|
||||||
query_form_post => $encoded,
|
query_form_post => $encoded,
|
||||||
unknown_status => $self->{unknown_http_status},
|
unknown_status => $self->{unknown_http_status},
|
||||||
warning_status => $self->{warning_http_status},
|
warning_status => $self->{warning_http_status},
|
||||||
|
@ -193,7 +193,7 @@ sub request_api {
|
||||||
$self->settings();
|
$self->settings();
|
||||||
my $token = $self->get_token();
|
my $token = $self->get_token();
|
||||||
my ($content) = $self->{http}->request(
|
my ($content) = $self->{http}->request(
|
||||||
url_path => $options{endpoint},
|
url_path => '/automation-api' . $options{endpoint},
|
||||||
get_param => $get_param,
|
get_param => $get_param,
|
||||||
header => ['Authorization: Bearer ' . $token],
|
header => ['Authorization: Bearer ' . $token],
|
||||||
unknown_status => '',
|
unknown_status => '',
|
||||||
|
@ -206,7 +206,7 @@ sub request_api {
|
||||||
$self->clean_token();
|
$self->clean_token();
|
||||||
$token = $self->get_token();
|
$token = $self->get_token();
|
||||||
$content = $self->{http}->request(
|
$content = $self->{http}->request(
|
||||||
url_path => $options{endpoint},
|
url_path => '/automation-api' . $options{endpoint},
|
||||||
get_param => $get_param,
|
get_param => $get_param,
|
||||||
header => ['Authorization: Bearer ' . $token],
|
header => ['Authorization: Bearer ' . $token],
|
||||||
unknown_status => $self->{unknown_http_status},
|
unknown_status => $self->{unknown_http_status},
|
||||||
|
|
Loading…
Reference in New Issue