From 1e05c7d52438009c2f106496a4760684bf0835b8 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Tue, 10 Dec 2024 14:24:48 -0500 Subject: [PATCH] Fix Ticket Summary move js inline with ticket.php as js files cant read php vars --- post/ai.php | 4 ++-- ticket.php | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/post/ai.php b/post/ai.php index c0ffd1ef..b3b15ca1 100644 --- a/post/ai.php +++ b/post/ai.php @@ -110,7 +110,7 @@ if (isset($_GET['ai_ticket_summary'])) { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', - 'Authorization: Bearer ' . $config_ai_api_key, + 'Authorization: Bearer ' . $config_ai_api_key ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data)); @@ -126,4 +126,4 @@ if (isset($_GET['ai_ticket_summary'])) { // Print the summary echo nl2br(htmlentities($summary)); -} +} \ No newline at end of file diff --git a/ticket.php b/ticket.php index 4e96277e..e080c662 100644 --- a/ticket.php +++ b/ticket.php @@ -379,9 +379,9 @@ if (isset($_GET['ticket_id'])) {
- + @@ -1217,4 +1217,19 @@ require_once "footer.php"; - +