Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meeting order #380

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/backend/src/services/integration/calendar.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ const saveUpcomingMeetingsToDatabase = async (meetings, userId) => {
if (!existingMeeting) {
const newMeeting = new Meeting({
title: meeting.summary,
source: 'calender',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix spelling error in source value.

The source value contains a spelling error: 'calender' should be 'calendar'.

-    source: 'calender',
+    source: 'calendar',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
source: 'calender',
source: 'calendar',

id: meeting.id,
user: userId,
metadata: {
status: meeting.status,
description: meeting.description,
location: meeting.location,
attendees: meeting.attendees,
hangoutLink: meeting.hangoutLink,
Expand Down Expand Up @@ -287,7 +287,6 @@ const handleCalendarWebhookService = async (accessToken, refreshToken, userId) =
existingMeeting.title = event.summary;
existingMeeting.metadata = {
status: event.status,
description: event.description,
location: event.location,
attendees: event.attendees,
hangoutLink: event.hangoutLink,
Expand All @@ -303,6 +302,7 @@ const handleCalendarWebhookService = async (accessToken, refreshToken, userId) =
// Create new meeting
const newMeeting = new Meeting({
title: event.summary,
source: 'calender',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix spelling error in source value.

The source value contains the same spelling error as before: 'calender' should be 'calendar'.

-    source: 'calender',
+    source: 'calendar',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
source: 'calender',
source: 'calendar',

id: event.id,
user: userId,
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/src/services/page/meeting.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const getMeeting = async (user) => {
const meetings = await Meeting.find({
user
})
.sort({ created_at: -1 });
.sort({ 'metadata.start.dateTime': 1 });

return meetings;
};
Expand Down