update
This commit is contained in:
@ -719,17 +719,38 @@ const DetailApprovalTransaction = () => {
|
|||||||
})
|
})
|
||||||
: ''}</td>
|
: ''}</td>
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">
|
<td className="px-4 py-2 text-sm text-gray-500">
|
||||||
{
|
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||||
JSON.stringify(log.request_body ?? '', null, 2)
|
{(() => {
|
||||||
}
|
try {
|
||||||
|
if (log.response_code === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const parsed = JSON.parse(log.request_body);
|
||||||
|
return JSON.stringify(parsed, null, 2);
|
||||||
|
} catch (e) {
|
||||||
|
return log.request_body; // fallback: tampilkan as-is jika gagal parse
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</pre>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">
|
<td className="px-4 py-2 text-sm text-gray-500">
|
||||||
{
|
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||||
JSON.stringify(log.response_body ?? '', null, 2)
|
{(() => {
|
||||||
}
|
try {
|
||||||
|
if (log.request_body === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const parsed = JSON.parse(log.request_body);
|
||||||
|
return JSON.stringify(parsed, null, 2) ?? '';
|
||||||
|
} catch (e) {
|
||||||
|
return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</pre>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">{log.request_endpoint || ''}</td>
|
<td className="px-4 py-2 text-sm text-gray-500">{log.request_endpoint || ''}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
@ -856,17 +877,38 @@ const DetailApprovalTransaction = () => {
|
|||||||
})
|
})
|
||||||
: ''}</td>
|
: ''}</td>
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">
|
<td className="px-4 py-2 text-sm text-gray-500">
|
||||||
{
|
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||||
JSON.stringify(log.request_body ?? '', null, 2)
|
{(() => {
|
||||||
}
|
try {
|
||||||
|
if (log.response_code === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const parsed = JSON.parse(log.request_body);
|
||||||
|
return JSON.stringify(parsed, null, 2);
|
||||||
|
} catch (e) {
|
||||||
|
return log.request_body; // fallback: tampilkan as-is jika gagal parse
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</pre>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">
|
<td className="px-4 py-2 text-sm text-gray-500">
|
||||||
{
|
<pre style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
|
||||||
JSON.stringify(log.response_body ?? '', null, 2)
|
{(() => {
|
||||||
}
|
try {
|
||||||
|
if (log.request_body === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const parsed = JSON.parse(log.request_body);
|
||||||
|
return JSON.stringify(parsed, null, 2) ?? '';
|
||||||
|
} catch (e) {
|
||||||
|
return log.response_body ?? ''; // fallback: tampilkan as-is jika gagal parse
|
||||||
|
}
|
||||||
|
})()}
|
||||||
|
</pre>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
<td className="px-4 py-2 text-sm text-gray-500">{log.request_endpoint ?? ''}</td>
|
<td className="px-4 py-2 text-sm text-gray-500">{log.request_endpoint ?? ''}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user