From c3d16850e2c4e2ed484ce72905ca94dbceb2a88e Mon Sep 17 00:00:00 2001 From: Brian Spiegel Date: Sat, 21 Mar 2026 10:59:41 -0400 Subject: [PATCH] refactor: Remove all references to unused meetingCollection export Verify and Remove Unused meetingCollection Export Resolves #13 --- src/meetings.service.getBySlug.spec.ts | 1 - src/meetings.service.getFacets.spec.ts | 1 - src/meetings.service.getMeetings.spec.ts | 1 - src/meetings.service.getRelatedGroupInfo.spec.ts | 1 - src/storage/event.mongodb.service.ts | 6 ------ src/storage/meeting.mongodb.service.ts | 4 ---- 6 files changed, 14 deletions(-) diff --git a/src/meetings.service.getBySlug.spec.ts b/src/meetings.service.getBySlug.spec.ts index 9cce3ad..768add5 100644 --- a/src/meetings.service.getBySlug.spec.ts +++ b/src/meetings.service.getBySlug.spec.ts @@ -5,7 +5,6 @@ import { jest } from "@jest/globals" import { MeetingView } from "./storage/storage.types.js" const mockMeetingStore = { - meetingCollection: {} as unknown, query: jest.fn(), bySlug: jest.fn<(slug: string) => Promise>(), byGroup: jest.fn(), diff --git a/src/meetings.service.getFacets.spec.ts b/src/meetings.service.getFacets.spec.ts index 497061a..3c25667 100644 --- a/src/meetings.service.getFacets.spec.ts +++ b/src/meetings.service.getFacets.spec.ts @@ -1,7 +1,6 @@ import { jest } from "@jest/globals" const mockMeetingStore = { - meetingCollection: {} as unknown, query: jest.fn(), bySlug: jest.fn(), byGroup: jest.fn(), diff --git a/src/meetings.service.getMeetings.spec.ts b/src/meetings.service.getMeetings.spec.ts index 50b10da..f5ece6a 100644 --- a/src/meetings.service.getMeetings.spec.ts +++ b/src/meetings.service.getMeetings.spec.ts @@ -8,7 +8,6 @@ import { Group } from "./endpoints.types.js" import { MeetingsOptions } from "./endpoint-options.types.js" const mockMeetingStore = { - meetingCollection: {} as unknown, query: jest.fn< (queryPipeline: unknown[], viewType?: string) => Promise diff --git a/src/meetings.service.getRelatedGroupInfo.spec.ts b/src/meetings.service.getRelatedGroupInfo.spec.ts index 36495ae..5a8ba01 100644 --- a/src/meetings.service.getRelatedGroupInfo.spec.ts +++ b/src/meetings.service.getRelatedGroupInfo.spec.ts @@ -7,7 +7,6 @@ import { MeetingView } from "./storage/storage.types.js" import { Group } from "./endpoints.types.js" const mockMeetingStore = { - meetingCollection: {} as unknown, query: jest.fn(), bySlug: jest.fn<(slug: string) => Promise>(), byGroup: diff --git a/src/storage/event.mongodb.service.ts b/src/storage/event.mongodb.service.ts index 1b50870..0aa40b3 100644 --- a/src/storage/event.mongodb.service.ts +++ b/src/storage/event.mongodb.service.ts @@ -15,12 +15,6 @@ const eventView = useCollection("events-view")( configuredMongoDatabase, ) -// export const addMeetings = async (resources: Meeting[]) => -// await meetingCollection.insertMany(resources) - -// export const dayOfWeek = async (day: number) => -// await meetingCollection.find({ day: day }).toArray() - const pipelineView = (pipeline: MongoDB.Document[], options = {}) => eventView.aggregate(pipeline, options) diff --git a/src/storage/meeting.mongodb.service.ts b/src/storage/meeting.mongodb.service.ts index a889eae..7970ac4 100644 --- a/src/storage/meeting.mongodb.service.ts +++ b/src/storage/meeting.mongodb.service.ts @@ -9,10 +9,6 @@ import { export type MeetingViewType = "scheduled" | "unscheduled" | "combined" -export const meetingCollection = useCollection("meeting")( - configuredMongoDatabase, -) - export const query = async ( queryPipeline: MongoDB.Document[], viewType: MeetingViewType = "combined",