From 1d84d254a91b0f36363ff3794f00f64d28f6e1e2 Mon Sep 17 00:00:00 2001 From: sarthak Date: Tue, 2 Apr 2024 09:56:10 -0500 Subject: [PATCH] revert: changes because the airtable api key doesn't have sufficient permissions to do what i need it to do --- pages/api/fiscal-sponsorship/apply.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/pages/api/fiscal-sponsorship/apply.js b/pages/api/fiscal-sponsorship/apply.js index 4993e484..0f77b80c 100644 --- a/pages/api/fiscal-sponsorship/apply.js +++ b/pages/api/fiscal-sponsorship/apply.js @@ -35,18 +35,22 @@ export default async function handler(req, res) { 'Event Name': data.eventName, 'Event Website': data.eventWebsite, 'Tell us about your event': data.eventDescription, - 'Mailing Address': '', - 'Address Line 1': '', - City: '', - State: '', - 'Zip Code': '', - 'Address Country': '', - 'Address Country Code': '', + 'Mailing Address': data.userAddress, + 'Address Line 1': data.addressLine1, + City: data.addressCity, + State: data.addressState, + 'Zip Code': data.addressZip, + 'Address Country': data.addressCountry, + 'Address Country Code': data.addressCountryCode, 'Event Location': data.eventLocation, - 'Event Country Code': getCode(data.eventLocation), - 'Have you used HCB for any previous events?': '', - 'How did you hear about HCB?': 'This field doesn\'t exist on the form anymore.', - Transparent: 'Yes, please!', + 'Event Country Code': data.eventCountryCode, + 'Have you used HCB for any previous events?': + data.returningUser === 'true' + ? 'Yes, I have used HCB before' + : 'No, first time!', + 'How did you hear about HCB?': data.referredBy, + Transparent: + data.transparent === 'true' ? 'Yes, please!' : 'No, thanks.', 'HCB account URL': `https://hcb.hackclub.com/${r.slug}`, 'Contact Option': data.contactOption, 'Slack Username': data.slackUsername,