Skip to content

Commit f4f1933

Browse files
rahulkeerthiclaude
andcommitted
fix: align worker with openapi spec — add count to resolve, update provider list
- /resolve now returns count field for consistency with other endpoints - Provider error hint expanded from 21 to 35 providers Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bec2b26 commit f4f1933

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

src/worker.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,25 @@ async function handleResolve(
222222
"worldfootball",
223223
"soccerbase",
224224
"kicker",
225+
"uefa",
226+
"lequipe",
227+
"fff_fr",
228+
"serie_a",
229+
"besoccer",
230+
"footballdatabase_eu",
231+
"eu_football_info",
232+
"hugman",
233+
"german_fa",
234+
"statmuse_pl",
235+
"sofifa",
236+
"soccerdonna",
237+
"dongqiudi",
238+
"playmakerstats",
225239
"understat",
226240
"whoscored",
241+
"clubelo",
227242
"sportmonks",
228243
"api_football",
229-
"clubelo",
230-
"sofifa",
231244
"fotmob",
232245
],
233246
},
@@ -236,9 +249,9 @@ async function handleResolve(
236249
}
237250

238251
const entity = await resolveEntity(db, provider, id);
239-
if (!entity) return json({ results: [] });
252+
if (!entity) return json({ results: [], count: 0 });
240253

241-
return json({ results: [entity] });
254+
return json({ results: [entity], count: 1 });
242255
}
243256

244257
const ENTITY_COLS = "qid, type, name_en, aliases_en, full_name, date_of_birth, nationality, position, current_team_qid, height_cm, country, founded, stadium";

0 commit comments

Comments
 (0)