mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-07-12 18:43:45 +00:00
feat(*): Update pokedex entry data structure and re-add error handling
This commit is contained in:
@@ -22,16 +22,19 @@ class CombinedDataRepository {
|
||||
},
|
||||
{
|
||||
$sort: {
|
||||
'boxPlacement.box': 1,
|
||||
'boxPlacement.row': 1,
|
||||
'boxPlacement.column': 1
|
||||
'boxPlacementForms.box': 1,
|
||||
'boxPlacementForms.row': 1,
|
||||
'boxPlacementForms.column': 1
|
||||
}
|
||||
},
|
||||
{ $skip: skip },
|
||||
{ $limit: limit }
|
||||
]).exec();
|
||||
|
||||
return combinedData.map((data) => ({
|
||||
// Filter out entries with no catch records
|
||||
const filteredData = combinedData.filter((data) => data.catchRecord);
|
||||
|
||||
return filteredData.map((data) => ({
|
||||
pokedexEntry: data as PokedexEntry,
|
||||
catchRecord: data.catchRecord as CatchRecord
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user