cito-mcp 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/match.js +11 -0
- package/package.json +1 -1
package/dist/tools/match.js
CHANGED
|
@@ -230,6 +230,17 @@ Example: { "game": "cs2", "matchId": "cs2-match-123", "view": "summary", "includ
|
|
|
230
230
|
upstreamCalls += 1;
|
|
231
231
|
rateLimit = { ...rateLimit, ...res.headers };
|
|
232
232
|
if (!res.ok) {
|
|
233
|
+
// Live tennis matches have no archive stats row yet, but the live
|
|
234
|
+
// detail payload (already fetched as `primary`) carries the full
|
|
235
|
+
// per-side stat block — serve that instead of a 404 partial.
|
|
236
|
+
if (game === 'tennis' && res.status === 404) {
|
|
237
|
+
const livePayload = asRecord(asRecord(primary.data)?.data) ?? asRecord(primary.data);
|
|
238
|
+
const liveStats = livePayload?.stats;
|
|
239
|
+
if (Array.isArray(liveStats) && liveStats.length) {
|
|
240
|
+
playerPerformances = liveStats;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
233
244
|
partial.push(partialFromRejection('playerPerformances', {
|
|
234
245
|
code: mapHttpToCode(res.status),
|
|
235
246
|
message: `player stats HTTP ${res.status}`,
|
package/package.json
CHANGED