From ca24c9925c4117082bd7765093e9bfc6b1abed90 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Fri, 6 Sep 2019 11:42:28 -0400 Subject: [PATCH] Fix typo --- src/interactions/meetingTutorial.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/interactions/meetingTutorial.js b/src/interactions/meetingTutorial.js index e34d2b6e..310bb85e 100644 --- a/src/interactions/meetingTutorial.js +++ b/src/interactions/meetingTutorial.js @@ -1,10 +1,10 @@ -import { airRecord, airPatch } from '../utils' +import { userRecord, airPatch } from '../utils' const interactionMeetingTutorial = (bot, message) => { const { user } = message console.log('Running meeting tutorial') - airRecord(user).then(userRecord => { + userRecord(user).then(userRecord => { const oldRecordData = JSON.parse(userRecord.fields['Data']) if (oldRecordData['Flag: Initiated tutorial']) { bot.whisper(message, `Hmmm.... looks like we've already started this tutorial`) @@ -12,8 +12,9 @@ const interactionMeetingTutorial = (bot, message) => { bot.whisper(message, `Hey <@${user}>! Welcome to the check-in tutorial. First I'll need to know when your first meeting is. Run this command to let me know: \`/meeting-time next wednesday at 4 PM\``) bot.whisper(message, "(If you don't know when your first meeting will be, just set it for a couple weeks for now so we can get through the tutorial, then you can change it later)") } - const newRecordData = JSON.parse(userRecord.fields['Data']) + const newRecordData = oldRecordData newRecordData['Flag: Initiated tutorial'] = true + airPatch('Orpheus', userRecord.id, JSON.stringify(newRecordFields)).then((newRecord) => { console.log('patching...') }).catch(err => { throw err })