Skip to content

Commit

Permalink
feat/#166
Browse files Browse the repository at this point in the history
  • Loading branch information
DungNguyen2003 committed Apr 21, 2023
1 parent 569ffe8 commit 9867058
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/apis/v1/userExam/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ export const getUserExamByOwner = async (userEmail: string, userExamId: string)
return {
answers: question?.answers,
content: question?.content,
image: question?.image,
accuracy: question?.accuracy,
_id: question._id,
};
}),
Expand Down Expand Up @@ -434,7 +436,7 @@ export const submitTheExam = async (input: SubmitTheExamDto, userEmail: string)
await calculateScore(userExam[0], userExam[0]?.user_answer_id);
logger.info(`Submit the exam successfully`);

return userExam[0];
return 'OK';
} catch (error) {
logger.error(`Error while submit the exam: ${error}`);
throw new HttpException(400, error, ErrorCodes.BAD_REQUEST.CODE);
Expand Down

0 comments on commit 9867058

Please sign in to comment.