Skip to content

Commit bc17fbd

Browse files
committed
set default id
1 parent 7926484 commit bc17fbd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

GoogleForm.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{"fvv":1,"pageHistory":0,"fbzx":"-8897733716120267094","action":"e/1FAIpQLSdma-rdJELwPGL-Iw7x28h3nZbvCaiFAABpz9B_17kuemSbWg","title":"Open Components Hackathon 2023","description":"","fields":[{"label":"First Name","description":null,"type":"SHORT_ANSWER","id":"43305576","required":true},{"label":"Last Name","description":null,"type":"SHORT_ANSWER","id":"1152868747","required":true},{"label":"Email","description":null,"type":"SHORT_ANSWER","id":"302100121","required":true},{"label":"Organization","description":null,"type":"SHORT_ANSWER","id":"1275262526","required":true},{"label":"Location","description":null,"type":"DROPDOWN","id":"1615300827","options":[{"label":"Remote"},{"label":"Orlando"},{"label":"New Delhi"},{"label":"Tbilisi"}],"required":true},{"label":"Local Timezone","description":null,"type":"SHORT_ANSWER","id":"2031577047","required":true},{"label":"Registering for","description":null,"type":"DROPDOWN","id":"1684942877","options":[{"label":"Learnathon"},{"label":"Hackathon"},{"label":"Both Events"}],"required":true},{"label":"Participation Type","description":null,"type":"RADIO","id":"562676403","options":[{"label":"Observer","custom":false},{"label":"Active participant","custom":false}],"required":true},{"label":"Dietary Restrictions","description":"If attending at a location","type":"RADIO","id":"213291136","options":[{"label":"N/A","custom":false},{"label":"","custom":true}],"required":true},{"label":"Software Skills","description":null,"type":"SHORT_ANSWER","id":"1072754394","required":false},{"label":"Would you be interested in leading a Learnathon session?","description":null,"type":"RADIO","id":"370990355","options":[{"label":"Yes","custom":false},{"label":"No","custom":false}],"required":true},{"label":"Expectations out of this experience?","description":null,"type":"LONG_ANSWER","id":"22302025","required":false}],"fieldsOrder":{"22302025":11,"43305576":0,"213291136":8,"302100121":2,"370990355":10,"562676403":7,"1072754394":9,"1152868747":1,"1275262526":3,"1615300827":4,"1684942877":6,"2031577047":5}}
1+
{
2+
"fields": []
3+
}

pages/api/generate.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import { promises as fs } from 'fs'
44
export default async function handler(req, res) {
55
const jsonDirectory = path.join(process.cwd())
66
const data = await require('react-google-forms-hooks').googleFormsToJson(
7-
'https://docs.google.com/forms/d/e/' + process.env.GOOGLE_FORM_ID + '/viewform'
7+
'https://docs.google.com/forms/d/e/' +
8+
(process.env.GOOGLE_FORM_ID ??
9+
'1FAIpQLSdma-rdJELwPGL-Iw7x28h3nZbvCaiFAABpz9B_17kuemSbWg') +
10+
'/viewform'
811
)
912
await fs.writeFile(jsonDirectory + '/GoogleForm.json', JSON.stringify(data))
1013
//Return the content of the data file in json format

0 commit comments

Comments
 (0)