From 7c70ebda5ddd48613da90ac7c3062281f630203d Mon Sep 17 00:00:00 2001 From: Hayden Smith Date: Sat, 7 Sep 2024 22:52:59 +1000 Subject: [PATCH] Sample repo working again --- backend/src/config.js | 4 ++-- backend/src/content.js | 3 ++- frontend/src/page/Timetable/TimetableLectures.jsx | 2 +- frontend/src/page/Timetable/TimetableTutorials.jsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/src/config.js b/backend/src/config.js index 5671393..951ce94 100644 --- a/backend/src/config.js +++ b/backend/src/config.js @@ -6,11 +6,11 @@ const config = { JWT_SECRET: 'TESTING2', PORT: 6080, COOKIE_EXPIRY: 60 * 60 * 24 * 7, - AIRTABLE_API_KEY: 'keyOJnoA6KHnByQUv', TERMS: { sample: { STUDENT_LIST_SH: 'echo "5555555\n3418003"', - AIRTABLE_BASE: 'appYoRmspUPWynt68', + AIRTABLE_BASE: 'app7CNZud3QDy1IP5', + AIRTABLE_API_KEY: 'patMWMSzpWIIw4ygQ.8905a12dae8ee6ecd484ea4dc3f1f2961f587b9c87a4682407063345298bd802', TUTOR_ID_LIST: [], AUDIT_ID_LIST: [] }, diff --git a/backend/src/content.js b/backend/src/content.js index b0cdf4c..ddefaeb 100644 --- a/backend/src/content.js +++ b/backend/src/content.js @@ -9,7 +9,8 @@ const tables = Object.keys(joinSchema); const generateContent = (term) => { const basename = config.TERMS[term].AIRTABLE_BASE; - const base = new Airtable({ apiKey: config.AIRTABLE_API_KEY }).base(basename); + const base = new Airtable({ apiKey: config.TERMS[term].AIRTABLE_API_KEY }).base(basename); + console.log(basename, base); return new Promise((resolve, reject) => { const obj = {}; Promise.all(tables.map(table => { diff --git a/frontend/src/page/Timetable/TimetableLectures.jsx b/frontend/src/page/Timetable/TimetableLectures.jsx index 658ec50..52514eb 100644 --- a/frontend/src/page/Timetable/TimetableLectures.jsx +++ b/frontend/src/page/Timetable/TimetableLectures.jsx @@ -58,7 +58,7 @@ const TimetableLectures = () => { } {getters.loggedIn && -

In-person in {rowKey < 2 ? 'Ainsworth G03' : 'Keith Burrows Theatre'}


+

{row.location}


diff --git a/frontend/src/page/Timetable/TimetableTutorials.jsx b/frontend/src/page/Timetable/TimetableTutorials.jsx index dfb59c5..2527c56 100644 --- a/frontend/src/page/Timetable/TimetableTutorials.jsx +++ b/frontend/src/page/Timetable/TimetableTutorials.jsx @@ -47,7 +47,7 @@ const TimetableTutorials = () => { {row.call_url_h.includes('http') ? ( + }}>Join ) : ( {row.call_url_h} )}