jaikamat / clubhouse-pos-importer

Monorepo for an LGS's inventory management system
1 stars 0 forks source link

Improve `getCardsByFilter` performance and support colors array #326

Closed jaikamat closed 3 years ago

jaikamat commented 3 years ago

Summary

Scryfall's recent migration left orphaned documents in the card_inventory collection that won't ever be matched to their respective bulk in a $lookup pipeline operation. Therefore, this PR attempts to exclude them from further pipeline operations using a preemptive measure.

Additionally, we have lightly modified the client to send colors as an array rather than a joined string, which improves comparisons and no longer requires complex array operations from the bulk card end.