Skip to content

Commit

Permalink
remove zoom links, create new route (#1731)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkmorgan3 authored Nov 4, 2024
1 parent 2b520c0 commit 3731bfe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions backend/routers/recurringEvents.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ router.get('/', cors(), (req, res) => {
RecurringEvent
// .find(query.checkInReady === 'true' ? query : undefined)
.find()
// This will deselect the video conference link field
.select("-videoConferenceLink")
.populate('project')
.then(recurringEvents => {
return res.status(200).send(recurringEvents);
Expand All @@ -23,6 +25,19 @@ router.get('/', cors(), (req, res) => {
});
});

router.get("/internal", (req, res) => {
RecurringEvent
.find()
.populate('project')
.then(recurringEvents => {
return res.status(200).send(recurringEvents)
})
.catch(err => {
console.error(err)
return res.status(400);
})
} )

router.get('/:id', (req, res) => {
RecurringEvent
.findById(req.params.id)
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/RecurringEventsApiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class RecurringEventsApiService {

async fetchRecurringEvents() {
try {
const res = await fetch(this.baseUrl, {
const res = await fetch(`${this.baseUrl}/internal`, {
headers: this.headers,
});
return await res.json();
Expand Down

0 comments on commit 3731bfe

Please sign in to comment.