Skip to content

Commit

Permalink
fix: removed console debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Apr 11, 2024
1 parent 1ce647e commit 54461d8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions caldav-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ class CalDAV extends API {
let err;
try {
// parse `ctx.request.body` for VCALENDAR and all VEVENT's
console.log('YOYO', ctx.request.body);
const comp = new ICAL.Component(ICAL.parse(ctx.request.body));
if (!comp) throw new TypeError('Component not parsed');

Expand Down Expand Up @@ -703,8 +702,6 @@ class CalDAV extends API {
synctoken: bumpSyncToken(calendar.synctoken)
};

console.log('update', update);

calendar = await Calendars.findByIdAndUpdate(
this,
ctx.state.session,
Expand All @@ -717,8 +714,6 @@ class CalDAV extends API {
}
);

console.log('updated calendar', calendar);

//
// NOTE: this isn't the safest way to do this (instead should only conditionally delete and update)
//
Expand All @@ -735,8 +730,6 @@ class CalDAV extends API {
}
);

console.log('deleted', deleted);

// create new VEVENTS
if (vevents.length > 0) {
const events = [];
Expand All @@ -758,16 +751,13 @@ class CalDAV extends API {
});
}

console.log('eventIdToEvents', eventIdToEvents);

for (const eventId of Object.keys(eventIdToEvents)) {
// eslint-disable-next-line no-await-in-loop
const ical = await this.buildICS(
ctx,
eventIdToEvents[eventId],
calendar
);
console.log('built ICAL', ical);
events.push({
// db virtual helper
instance: this,
Expand All @@ -781,15 +771,11 @@ class CalDAV extends API {
});
}

console.log('events', events);

const createdEvents = await CalendarEvents.create(
this,
ctx.state.session,
events
);

console.log('createdEvents', createdEvents);
}

return calendar;
Expand Down Expand Up @@ -1139,7 +1125,7 @@ class CalDAV extends API {
e.isNew = false;

// TODO: is this not updating?
console.log('UPDATING BODY', ctx.request.body);
// console.log('UPDATING BODY', ctx.request.body);

e.ical = ctx.request.body;

Expand Down Expand Up @@ -1269,8 +1255,6 @@ class CalDAV extends API {
}
}

console.log('STRINGIFIED', comp.toString());

return comp.toString();
}

Expand Down

0 comments on commit 54461d8

Please sign in to comment.