Skip to content

Commit

Permalink
Fix: add organization_slots to the array of normal slots in getCalend…
Browse files Browse the repository at this point in the history
…arFiveWeeks
  • Loading branch information
georgipavlov-7DIGIT committed Sep 26, 2024
1 parent 19b23df commit b0f94e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service/controllers/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ export const getCalendarFiveWeeks = async ({
}).catch((err) => {
throw err;
});
console.log(slotsData);

const organizationSlotTimes = Array.isArray(slotsData.organization_slots)
? slotsData.organization_slots.map((x) => x.time)
: [];
return {
slots: slotsData.slots,
slots: [...slotsData.slots, ...organizationSlotTimes],
campaign_slots: slotsData.campaign_slots,
campaigns_data: slotsData.campaigns_data,
consultations,
Expand Down

0 comments on commit b0f94e4

Please sign in to comment.