Skip to content

Commit 5106be1

Browse files
allow no middleware, no debug
1 parent 0c33279 commit 5106be1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/components/ApiAction.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export default function ApiAction(props: Props) {
140140
let data
141141
try {
142142
data = JSON.parse(dataString) as LRDResponse
143+
console.log(data)
143144
} catch (error: any) {
144145
isJson = false
145146
// do nothing
@@ -174,7 +175,12 @@ export default function ApiAction(props: Props) {
174175
})
175176
}
176177
if (isJson) {
177-
setResponseData(JSON.stringify(data?.data, null, 2))
178+
if (data?.data) {
179+
setResponseData(JSON.stringify(data?.data, null, 2))
180+
} else {
181+
setResponseData(JSON.stringify(data, null, 2))
182+
}
183+
178184
} else {
179185
setResponseData(dataString)
180186
}

0 commit comments

Comments
 (0)