Skip to content

Commit

Permalink
fix: SAT-222/fix-order-of-meetings-in-meetings-space
Browse files Browse the repository at this point in the history
  • Loading branch information
sajdakabir committed Oct 23, 2024
1 parent b8fffdd commit fb42d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/backend/src/services/integration/calendar.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ const saveUpcomingMeetingsToDatabase = async (meetings, userId) => {
if (!existingMeeting) {
const newMeeting = new Meeting({
title: meeting.summary,
source: 'calender',
id: meeting.id,
user: userId,
metadata: {
Expand Down Expand Up @@ -301,6 +302,7 @@ const handleCalendarWebhookService = async (accessToken, refreshToken, userId) =
// Create new meeting
const newMeeting = new Meeting({
title: event.summary,
source: 'calender',
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

0 comments on commit fb42d13

Please sign in to comment.