diff options
author | eug-vs <eug-vs@keemail.me> | 2020-11-28 01:28:29 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-11-28 01:31:27 +0300 |
commit | 216f5d6603398826e560e8cad386029c60c1470d (patch) | |
tree | 1c873b2c65dae0fee4dc03e38dea58a335345713 | |
parent | c3b76d1b5d0f85deb9a52dbe516c665ab4de8c07 (diff) | |
download | bsu-fantom-216f5d6603398826e560e8cad386029c60c1470d.tar.gz |
fix: pull data from event context in handler
-rw-r--r-- | src/handlers/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handlers/index.js b/src/handlers/index.js index 4e7ee83..ba040fd 100644 --- a/src/handlers/index.js +++ b/src/handlers/index.js @@ -17,7 +17,7 @@ const handleEventAsUser = async (event, browser, user) => { const browserContext = await browser.createIncognitoBrowserContext(); - const { conferenceId } = event; + const { conferenceId } = event.context; const conferenceUrl = `${EDUFPMI_URL}/mod/bigbluebuttonbn/view.php?id=${conferenceId}`; const page = await launchUserSession(user, browserContext); @@ -40,11 +40,11 @@ const handleEventAsUser = async (event, browser, user) => { const handleEvent = async event => { const participants = await UserModel.find({ username: { - $in: event.participants + $in: event.context.participants } }); - event.log('Participants: ', participants.map(participant => participant.username)); + event.log(`Participants: ${participants.map(participant => participant.username)}`); const browser = await puppeteer.launch({ headless, args: ['--no-sandbox', '--incognito'] }); |