Skip to content

Commit

Permalink
Revert merge conflict changes
Browse files Browse the repository at this point in the history
- reverted merge conflict changes (accept incoming when actually wanted to keep current)
  • Loading branch information
isaachan100 committed Apr 21, 2023
1 parent 424c8ea commit 2cd254c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/repos/FlyerRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const getFlyersByOrganizationID = async (
.skip(offset)
.limit(limit)
.then((flyers) => {
return flyers.filter((flyer) => !isFlyerFiltered(flyer));
return flyers.filter((flyer) => flyer !== null && !isFlyerFiltered(flyer));
});
};

Expand All @@ -98,7 +98,6 @@ const getFlyersByOrganizationIDs = async (
offset: number = DEFAULT_OFFSET,
): Promise<Flyer[]> => {
const uniqueOrgIDs = [...new Set(organizationIDs)].map((id) => new ObjectId(id));
console.log(uniqueOrgIDs);
const orgSlugs = await OrganizationModel.find({ _id: { $in: uniqueOrgIDs } }).select('slug');
return getFlyersByOrganizationSlugs(
orgSlugs.map((org) => org.slug),
Expand All @@ -117,7 +116,7 @@ const getFlyersAfterDate = async (since: string, limit = DEFAULT_LIMIT): Promise
.sort({ date: 'desc' })
.limit(limit)
.then((flyers) => {
return flyers.filter((flyer) => !isFlyerFiltered(flyer));
return flyers.filter((flyer) => flyer !== null && !isFlyerFiltered(flyer));
})
);
};
Expand Down Expand Up @@ -219,8 +218,8 @@ export default {
getFlyersByOrganizationIDs,
getFlyersByOrganizationSlug,
getFlyersByOrganizationSlugs,
searchFlyers,
getTrendingFlyers,
incrementShoutouts,
refreshTrendingFlyers,
searchFlyers,
};

0 comments on commit 2cd254c

Please sign in to comment.