fix(service-test): rename response 'data' field to 'result' to avoid api client unwrap conflict
Some checks failed
CI / Lint, Typecheck, Test & Build (push) Has been cancelled
Some checks failed
CI / Lint, Typecheck, Test & Build (push) Has been cancelled
The api client unwraps response.data automatically, which conflicts with our testService response having its own 'data' field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,7 @@ function ServiceTestPage() {
|
||||
service: string;
|
||||
success: boolean;
|
||||
responseTimeMs: number;
|
||||
data: any;
|
||||
result: any;
|
||||
error?: string;
|
||||
} | null>(null);
|
||||
const [copied, setCopied] = useState(false);
|
||||
@@ -287,11 +287,11 @@ function ServiceTestPage() {
|
||||
)}
|
||||
|
||||
{/* JSON output */}
|
||||
{result.data !== null && (
|
||||
{result.result !== null && (
|
||||
<>
|
||||
<Separator className="my-4 bg-border" />
|
||||
<pre className="max-h-[600px] overflow-auto rounded-xl border border-border bg-muted/50 p-4 font-mono text-xs leading-relaxed">
|
||||
{JSON.stringify(result.data, null, 2)}
|
||||
{JSON.stringify(result.result, null, 2)}
|
||||
</pre>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user