From b65df9d2257e90b39216de4c10fc9ac9a5c8f199 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Tue, 22 Oct 2019 13:37:53 -0400 Subject: [PATCH] Add github email to airtable prefill --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 52bd976..75d8fa3 100644 --- a/src/index.js +++ b/src/index.js @@ -49,11 +49,12 @@ app.get('/', async (req, res) => { }) const username = ghUser.data && ghUser.data.login + const email = ghUser.data && ghUser.data.email if (username) { console.log( `GitHub tells me that this user is 'https://github.com/${username}'. I'll redirect them to the Airtable.` ) - res.redirect(302, `${formUrl}?prefill_GitHub%20Username=${username}`) + res.redirect(302, `${formUrl}?prefill_GitHub%20Username=${username}&prefil_GitHub%20Email=${email}`) } else { console.log( "GitHub doesn't recognize this user. I'll just send them to the Airtable with nothing prefilled."