Skip to content

Commit 21b355b

Browse files
refactor: Update user ID parsing in SubmitCode function
1 parent e13feb8 commit 21b355b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controllers/submission.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ func SubmitCode(w http.ResponseWriter, r *http.Request) {
6363
return
6464
}
6565

66-
// user_id, _ := r.Context().Value("user_id").(string)
67-
userID, _ := uuid.Parse("d3f1c8c2-b6d9-4822-9222-67b8d93fd9d5")
66+
user_id, _ := r.Context().Value("user_id").(string)
67+
userID, _ := uuid.Parse(user_id)
6868
qID, _ := uuid.Parse(req.QuestionID)
6969
nullUserID := uuid.NullUUID{UUID: userID, Valid: true}
7070

0 commit comments

Comments
 (0)