Skip to content

Commit 4fe1a70

Browse files
committed
Fix parsing of ticket response
1 parent af528ba commit 4fe1a70

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@snf/access-qa-bot",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"private": false,
55
"homepage": ".",
66
"description": "ACCESS Q&A Bot React Component with support ticket creation, feedback collection, and ProForma integration",

src/utils/flows/security-flow.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ export const createSecurityFlow = ({
249249
if (result.success) {
250250
submissionResult = {
251251
success: true,
252-
ticketKey: result.data?.data?.ticketKey,
253-
ticketUrl: result.data?.data?.ticketUrl
252+
ticketKey: result.data?.ticketKey,
253+
ticketUrl: result.data?.ticketUrl
254254
};
255255
setTicketForm(prevForm => ({
256256
...prevForm,
257-
ticketKey: result.data?.data?.ticketKey,
258-
ticketUrl: result.data?.data?.ticketUrl
257+
ticketKey: result.data?.ticketKey,
258+
ticketUrl: result.data?.ticketUrl
259259
}));
260260
} else {
261261
submissionResult = {

src/utils/flows/tickets/ticket-flow-utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ export const createSubmissionHandler = (setTicketForm) => {
3939
if (proxyResponse.success) {
4040
submissionResult = {
4141
success: true,
42-
ticketKey: proxyResponse.data.data.ticketKey,
43-
ticketUrl: proxyResponse.data.data.ticketUrl
42+
ticketKey: proxyResponse.data.ticketKey,
43+
ticketUrl: proxyResponse.data.ticketUrl
4444
};
4545
setTicketForm(prevForm => ({
4646
...prevForm,
47-
ticketKey: proxyResponse.data.data.ticketKey,
48-
ticketUrl: proxyResponse.data.data.ticketUrl
47+
ticketKey: proxyResponse.data.ticketKey,
48+
ticketUrl: proxyResponse.data.ticketUrl
4949
}));
5050
} else {
5151
console.error(`| ❌ ${ticketType} ticket creation failed:`, proxyResponse.data?.message || proxyResponse.error);

0 commit comments

Comments
 (0)