add ticket description to AI Query

This commit is contained in:
o-psi
2024-02-21 11:16:40 -06:00
parent 03bd7f837c
commit b31f1b4c49
3 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
document.getElementById('rewordButton').addEventListener('click', function() {
var textInput = document.getElementById('textInput');
var ticketDescription = document.getElementById('ticketDescription');
var rewordButton = document.getElementById('rewordButton');
var undoButton = document.getElementById('undoButton');
var previousText = textInput.value; // Store the current text
@@ -13,7 +14,7 @@ document.getElementById('rewordButton').addEventListener('click', function() {
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: textInput.value }),
body: JSON.stringify({ text: textInput.value, description: ticketDescription.value }),
})
.then(response => response.json())
.then(data => {