diff --git a/src/repos/FlyerRepo.ts b/src/repos/FlyerRepo.ts index e81f060..162f359 100644 --- a/src/repos/FlyerRepo.ts +++ b/src/repos/FlyerRepo.ts @@ -76,7 +76,7 @@ const getFlyersByCategorySlug = async ( * @returns a list of Strings with all the category names. */ const getAllFlyerCategories = (): Promise => { - return FlyerModel.collection.distinct('categorySlug'); + return FlyerModel.find().distinct('categorySlug').exec(); }; const getFlyerByID = async (id: string): Promise => {