9 lines
278 B
JavaScript
9 lines
278 B
JavaScript
|
|
export function normalizeMatches(result) {
|
||
|
|
return (result.matches || []).map((match) => ({
|
||
|
|
id: match.photoId,
|
||
|
|
label: match.label || match.photoId,
|
||
|
|
checkpoint: match.checkpoint || '-',
|
||
|
|
thumb: match.thumb || match.photoId,
|
||
|
|
score: match.score ?? null
|
||
|
|
}));
|
||
|
|
}
|