Lashtw commited on
Commit
7ef5d47
·
verified ·
1 Parent(s): 8cea41a

Upload 9 files

Browse files
Files changed (1) hide show
  1. src/views/InstructorView.js +5 -1
src/views/InstructorView.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createRoom, subscribeToRoom, getChallenges, resetProgress, removeUser } from "../services/classroom.js";
2
  import { loginWithEmail, registerWithEmail, signOutUser, checkInstructorPermission, getInstructors, addInstructor, updateInstructor, removeInstructor } from "../services/auth.js";
3
  import { generateMonsterSVG, getNextMonster, MONSTER_DEFS } from "../utils/monsterUtils.js";
4
 
@@ -517,6 +517,10 @@ export function setupInstructorEvents() {
517
  const dashboardContent = document.getElementById('dashboard-content');
518
 
519
  await createRoom(roomCode, currentInstructor ? currentInstructor.name : 'Unknown');
 
 
 
 
520
  displayRoomCode.textContent = roomCode;
521
 
522
  // Store in LocalStorage
 
1
+ import { createRoom, subscribeToRoom, getChallenges, resetProgress, removeUser, cleanupOldRooms } from "../services/classroom.js";
2
  import { loginWithEmail, registerWithEmail, signOutUser, checkInstructorPermission, getInstructors, addInstructor, updateInstructor, removeInstructor } from "../services/auth.js";
3
  import { generateMonsterSVG, getNextMonster, MONSTER_DEFS } from "../utils/monsterUtils.js";
4
 
 
517
  const dashboardContent = document.getElementById('dashboard-content');
518
 
519
  await createRoom(roomCode, currentInstructor ? currentInstructor.name : 'Unknown');
520
+
521
+ // Trigger cleanup of old rooms
522
+ cleanupOldRooms();
523
+
524
  displayRoomCode.textContent = roomCode;
525
 
526
  // Store in LocalStorage