Skip to content

Commit d8551f3

Browse files
authored
Merge pull request #187 from CS3219-AY2425S1/fix/bug/collab-service/getQuestionId
Add missing room id extraction
2 parents 436888a + 4d55f1c commit d8551f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

collab-service/app/controller/collab-controller.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ export async function getRoomChatHistory(req, res) {
7676

7777
// Get QuestionId from the room based on the roomId
7878
export async function getQuestionId(req, res) {
79+
const { roomId } = req.params;
80+
81+
if (!roomId) {
82+
return res.status(400).json({ error: "Room ID is required" });
83+
}
7984
const questionId = await getQuestionIdByRoomId(roomId);
8085

8186
if (questionId) {

0 commit comments

Comments
 (0)