Skip to content
Snippets Groups Projects
Commit 137a8402 authored by PASQUIER-TROIANO AZZO's avatar PASQUIER-TROIANO AZZO
Browse files

:twisted_rightwards_arrows: merge fix: userid bug has been fixed

Merge branch 'fix/38-bug-on-userid' into 'develop'
parents 3af20216 5aefe4b9
3 merge requests!61🔀merge V1.2,!60V1.2,!50fix: userid bug has been fixed
Pipeline #311197 passed with stages
in 1 minute and 23 seconds
......@@ -110,10 +110,11 @@ export class QuizController {
@Body() createCommunityQuizDto: CreateCommunityQuizDto,
@Req() req: any,
) {
const authorId = req.userId;
try {
const quiz = await this.quizService.createCommunityQuiz(
createCommunityQuizDto,
req.user,
authorId,
);
return { id: quiz.id };
} catch (error) {
......
......@@ -188,7 +188,7 @@ export class QuizService {
});
const questionCount = transformedQuestions.length;
const authorId = user.id;
const authorId = user;
if (!name) {
throw new Error('Name is required');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment