2
0
Files
cal/calcom/packages/features/get-cal-video-reference.ts
2024-08-09 00:39:27 +02:00

14 lines
410 B
TypeScript

export type Reference = {
id: number;
uid: string;
type: string;
meetingUrl: string | null;
meetingPassword: string | null;
};
export const getCalVideoReference = (references: Reference[]) => {
const videoReferences = references.filter((reference) => reference.type.includes("_video"));
const latestVideoReference = videoReferences[videoReferences.length - 1];
return latestVideoReference;
};