chore: refactor JSON timetable import

This commit is contained in:
2025-08-28 15:19:18 +02:00
parent 48445020c8
commit 97e3758bc1
3 changed files with 11 additions and 49 deletions
+6 -6
View File
@@ -164,7 +164,7 @@ async function updateAcademicData() {
const firstMonday = getFirstMondayAfter(semesterStartDateStr);
const academicData = {
const semesterData = {
timetableIds,
semesterStartDateStr,
firstMondayDate: firstMonday.toISOString(),
@@ -172,11 +172,11 @@ async function updateAcademicData() {
lastUpdated: new Date().toISOString(),
academicYear: getCurrentAcademicYear()
};
// Save to public/timetable-ids-dates.json
fs.writeFileSync('public/timetable-ids-dates.json', JSON.stringify(academicData, null, 2));
console.log('✅ Academic data updated successfully');
// Save to src/semester-data.json
fs.writeFileSync('src/semester-data.json', JSON.stringify(semesterData, null, 2));
console.log('✅ Semester data updated successfully');
}
// Run the script