* URL-encodes a Zoom meeting UUID. Double-encodes when the UUID starts with '/' * or contains '//', per Zoom's API requirements.
(uuid: string)
| 78 | * or contains '//', per Zoom's API requirements. |
| 79 | */ |
| 80 | function encodeMeetingUuid(uuid: string): string { |
| 81 | const encoded = encodeURIComponent(uuid) |
| 82 | if (uuid.startsWith('/') || uuid.includes('//')) { |
| 83 | return encodeURIComponent(encoded) |
| 84 | } |
| 85 | return encoded |
| 86 | } |
| 87 | |
| 88 | function formatDate(date: Date): string { |
| 89 | const y = date.getFullYear() |