Skip to content

Commit

Permalink
Micro PR for Flyers categorySlug migration (#108)
Browse files Browse the repository at this point in the history
* Add migration script to update data based on new Flyers schema

* Update Flyer trendiness

* Fix comments

* Clean up syntax for get trending flyers

* Remove unnecessary createSpecificsByIndex function

* Fix TypeScript compilation error

* Update migration script to account for category slug

* Fix formatting for flyers test
  • Loading branch information
zachseidner1 committed Sep 20, 2023
1 parent cc16b13 commit ed241dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migrations/update-flyers-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
$set: {
organization: { $first: '$organizations' },
organizationSlug: { $first: '$organizationSlugs' },
categorySlug: { $first: '$organizations.categorySlug' },
},
},
{
Expand All @@ -31,7 +32,7 @@ module.exports = {
},
},
{
$unset: ['organization', 'organizationSlug'],
$unset: ['organization', 'organizationSlug', 'categorySlug'],
},
]);
},
Expand Down

0 comments on commit ed241dc

Please sign in to comment.