Skip to content

Commit

Permalink
use post
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhoune committed Feb 4, 2024
1 parent cfc20e1 commit 5ee3d8b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/statistics/bot-statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ class BotStats extends LitElement {
.get("event-log-endpoint")
.toString();

const botModel = this.y.getMap("data").get('model')

if (
!botManagerEndpointInput ||
!pm4botsEndpointInput ||
Expand All @@ -457,13 +459,17 @@ class BotStats extends LitElement {

try {
const response = await fetch(url, {
method: "POST",
timeout: 10000,
headers: {
"Access-Control-Allow-Origin": "*",
Accept: "text/html",
"Content-Type": "application/json",
},
body: JSON.stringify({
"bot-model": botModel,
}),
});

if (!response.ok) {
try {
const body = await response.json();
Expand Down Expand Up @@ -528,6 +534,8 @@ class BotStats extends LitElement {
.get("event-log-endpoint")
.toString();

const botModel = this.y.getMap("data").get('model')

if (
!botManagerEndpointInput ||
!pm4botsEndpointInput ||
Expand All @@ -549,11 +557,17 @@ class BotStats extends LitElement {

try {
const response = await fetch(url, {
method: "POST",
timeout: 10000,
headers: {
"Access-Control-Allow-Origin": "*",
Accept: "text/html",
'Content-type': 'application/json'
},

body: JSON.stringify({
"bot-model": botModel,
}),
});

if (!response.ok) {
Expand Down

0 comments on commit 5ee3d8b

Please sign in to comment.