Skip to content
Snippets Groups Projects
Commit 6149c407 authored by Ashley Caselli's avatar Ashley Caselli
Browse files

fix(js): update the custom action request

parent 6bb64082
No related branches found
No related tags found
No related merge requests found
......@@ -354,21 +354,13 @@ function actionTrigger() {
// eslint-disable-next-line no-unused-vars
function customActionTrigger() {
$.ajax({
url: config.action_server() + "/webhook",
url: config.server_url() + "/webhooks/rest/webhook",
type: "POST",
contentType: "application/json",
data: JSON.stringify({
next_action: config.action_name(),
tracker: {
sender_id: config.sender_id(),
},
}),
data: JSON.stringify({message: "/bonjour", sender: config.sender_id()}),
success(botResponse, status) {
console.debug("Response from Rasa: ", botResponse, "\nStatus: ", status);
if (Object.hasOwnProperty.call(botResponse, "responses")) {
setBotResponse(botResponse.responses);
}
setBotResponse(botResponse);
$("#userInput").prop("disabled", false);
},
error(xhr, textStatus) {
......@@ -380,10 +372,6 @@ function customActionTrigger() {
});
}
function customActionTrigger2() {
send("/actus");
}
/**
* clears the conversation from the chat screen
* & sends the `/resart` event to the Rasa server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment