- Fixed events fetching in family view because there are events that don't have the private field

- Implemented marking events as private
This commit is contained in:
Dejan
2025-01-17 02:00:36 +01:00
parent 9c3b9b3663
commit 413164128b
3 changed files with 8 additions and 11 deletions

View File

@ -29,7 +29,7 @@ const fetchEvents = async (userId: string, profileData: UserProfile | undefined,
if (isFamilyView || profileData?.userType === ProfileType.FAMILY_DEVICE) {
constraints = [
eventsQuery.where("familyId", "==", familyId).where("private", "==", false),
eventsQuery.where("familyId", "==", familyId).where("private", "not-in", [true]),
eventsQuery.where("creatorId", "==", userId),
eventsQuery.where("attendees", "array-contains", userId)
];