From 0b8df70e6f048412b16999cb037b5dfc79bb12f3 Mon Sep 17 00:00:00 2001 From: Samuel Lim Date: Wed, 13 Nov 2024 16:28:17 +0800 Subject: [PATCH] Fix forfeit not retrieving snapshot --- services/collaboration/src/controllers/roomController.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/collaboration/src/controllers/roomController.ts b/services/collaboration/src/controllers/roomController.ts index 915115237f..4aab3357cb 100644 --- a/services/collaboration/src/controllers/roomController.ts +++ b/services/collaboration/src/controllers/roomController.ts @@ -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);