Skip to content

Commit

Permalink
Fix forfeit not retrieving snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelim01 committed Nov 13, 2024
1 parent 3164014 commit 0b8df70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/collaboration/src/controllers/roomController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ export const updateUserStatusInRoomController = async (req: Request, res: Respon
return handleHttpNotFound(res, 'User not found in room');
}

// Obtain code and language
const snapshot = await retrieveSnapshot(roomId);

// Record the forfeited status in the user's history
await produceUpdateHistory(roomId, userId, HistoryStatus.FORFEITED, snapshot);

Expand Down

0 comments on commit 0b8df70

Please sign in to comment.