We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9708921 commit 74ce44aCopy full SHA for 74ce44a
scripts/sync-to-api.js
@@ -104,7 +104,10 @@ async function main() {
104
process.exit(1);
105
}
106
107
- const result = await response.json();
+ const responseData = await response.json();
108
+ // API 返回统一格式 { success: true, data: {...} }
109
+ const result = responseData.data || responseData;
110
+
111
console.log("\n✅ Sync successful!");
112
console.log(` Course: ${result.course?.action || "unknown"}`);
113
console.log(` Stages: created=${result.stages?.created || 0}, updated=${result.stages?.updated || 0}`);
0 commit comments