From add4eded935304cd3dfa61188b91df88c6d792e7 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Fri, 7 Jun 2024 14:49:07 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20resolve=20typos=20and=20t?= =?UTF-8?q?ypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/availability/[slug]/+page.server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/availability/[slug]/+page.server.ts b/src/routes/availability/[slug]/+page.server.ts index c67fac9..afe81fd 100644 --- a/src/routes/availability/[slug]/+page.server.ts +++ b/src/routes/availability/[slug]/+page.server.ts @@ -24,14 +24,14 @@ import type { ZotDate } from "$lib/utils/ZotDate"; export const load: PageServerLoad = (async ({ locals, params }) => { const user = locals.user; // @ts-expect-error slug is defined in the route - const meeting_id: string = params?.slug; + const meeting_id: string = params?.slug ?? ""; // TODO: If no slug is in the URL (i.e. no meeting ID), we should redirect to an error page return { form: await superValidate(_loginSchema), availability: user ? await getUserSpecificAvailability(user, meeting_id) : null, - groupAvailabilities: await getMeetingMemeberAvailabilities(meeting_id), + groupAvailabilities: await getMeetingMemberAvailabilities(meeting_id), meetingId: meeting_id as string | undefined, meetingData: await getExistingMeeting(meeting_id), defaultDates: (await _getMeetingDates(meeting_id)) ?? [], @@ -59,7 +59,7 @@ const getUserSpecificAvailability = async ( * @param meetingId * @returns a record of the member name to their availabilities, each sorted by date */ -async function getMeetingMemeberAvailabilities(meetingId: string) { +async function getMeetingMemberAvailabilities(meetingId: string) { const raw_availabilities = await db .select({ username: users.displayName,