Skip to content

Commit

Permalink
Add these checks (but I doubt they'll change anything)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgira23 committed Sep 21, 2023
1 parent b547802 commit 914b900
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/libs/feeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ export async function addPortalQueueClasses(db: Db, user: string) {

for (const ev of newEvents) {
ev.user = userDoc!._id;

// Iterate through all keys and remove any that contain periods
for (const key of Object.keys(ev)) {
if (key.includes('.')) {
delete ev[key];
}
}
}

try {
Expand Down Expand Up @@ -165,6 +172,13 @@ export async function addPortalQueueCalendar(db: Db, user: string) {

for (const ev of newEvents) {
ev.user = userDoc!._id;

// Iterate through all keys and remove any that contain periods
for (const key of Object.keys(ev)) {
if (key.includes('.')) {
delete ev[key];
}
}
}

try {
Expand Down

0 comments on commit 914b900

Please sign in to comment.