Skip to content

Commit a3cfa62

Browse files
committed
clean up code
1 parent 617a5e4 commit a3cfa62

File tree

4 files changed

+1
-35
lines changed

4 files changed

+1
-35
lines changed

backend/collab-service/src/handlers/websocketHandler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export const handleWebsocketCollabEvents = (socket: Socket) => {
8383
language: language,
8484
})
8585
.then((res) => {
86-
console.log("created in collab");
8786
doc.transact(() => {
8887
doc.getText().insert(0, template);
8988
});

backend/qn-history-service/src/controllers/questionHistoryController.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const createQnHistory = async (
2727
timeTaken,
2828
code,
2929
language,
30-
//compilerRes,
3130
} = req.body;
3231

3332
const newQnHistory = new QnHistory({
@@ -39,7 +38,6 @@ export const createQnHistory = async (
3938
timeTaken,
4039
code,
4140
language,
42-
//compilerRes,
4341
});
4442

4543
await newQnHistory.save();
@@ -237,21 +235,5 @@ const formatQnHistoryResponse = (qnHistory: IQnHistory) => {
237235
timeTaken: qnHistory.timeTaken,
238236
code: qnHistory.code,
239237
language: qnHistory.language,
240-
//compilerRes: qnHistory.compilerRes.map(formatCompilerRes),
241238
};
242239
};
243-
244-
/*const formatCompilerRes = (compilerRes: ICompilerRes) => {
245-
return {
246-
status: compilerRes.status,
247-
exception: compilerRes.exception,
248-
stdout: compilerRes.stdout,
249-
stderr: compilerRes.stderr,
250-
executionTime: compilerRes.executionTime,
251-
stdin: compilerRes.stdin,
252-
stout: compilerRes.stdout,
253-
actualResult: compilerRes.actualResult,
254-
expectedResult: compilerRes.expectedResult,
255-
isMatch: compilerRes.isMatch,
256-
};
257-
};*/

frontend/src/contexts/CollabContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { toast } from "react-toastify";
1212

1313
import { useMatch } from "./MatchContext";
14-
import { qnHistoryClient, codeExecutionClient } from "../utils/api";
14+
import { codeExecutionClient } from "../utils/api";
1515
import { useReducer } from "react";
1616
import { updateQnHistoryById } from "../reducers/qnHistoryReducer";
1717
import qnHistoryReducer, { initialQHState } from "../reducers/qnHistoryReducer";

frontend/src/reducers/qnHistoryReducer.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@ import { Dispatch } from "react";
22
import { qnHistoryClient } from "../utils/api";
33
import { isString, isStringArray } from "../utils/typeChecker";
44

5-
/*type CompilerResult = {
6-
status?: string;
7-
exception?: string;
8-
stdout?: string;
9-
stderr?: string;
10-
executionTime?: number;
11-
stdin: string;
12-
stout?: string;
13-
actualResult?: string;
14-
expectedResult: string;
15-
isMatch?: boolean;
16-
};*/
17-
185
type QnHistoryDetail = {
196
id: string;
207
userIds: Array<string>;
@@ -25,7 +12,6 @@ type QnHistoryDetail = {
2512
timeTaken: number;
2613
code: string;
2714
language: string;
28-
//compilerRes: CompilerResult;
2915
};
3016

3117
type QnHistoryList = {
@@ -119,7 +105,6 @@ export const createQnHistory = async (
119105
timeTaken: qnHistory.timeTaken,
120106
code: qnHistory.code,
121107
language: qnHistory.language,
122-
//compilerRes: qnHistory.compilerRes,
123108
})
124109
.then((res) => {
125110
dispatch({

0 commit comments

Comments
 (0)