Skip to content

Commit

Permalink
isOpen field added in createQuiz
Browse files Browse the repository at this point in the history
  • Loading branch information
vitodibari committed Oct 12, 2024
1 parent b1881f0 commit 2ec87d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/src/functions/quiz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { serializedErrorResponse, serializedExceptionResponse, serializedSuccess
import { generateUniqueRandomStrings } from "../utils/stringHelpers";

export const createQuiz = functions.https.onCall(async (data, context) => {
const { questionList, type, talkId, sponsorId, title } = data;
const { questionList, type, talkId, sponsorId, title, isOpen } = data;

if (!context.auth) {
return serializedErrorResponse("unauthenticated", "User must be authenticated.");
Expand Down Expand Up @@ -73,7 +73,7 @@ export const createQuiz = functions.https.onCall(async (data, context) => {
sponsorId: sponsorId ?? "",
title: title ?? "",
maxScore: maxScore,
isOpen: false,
isOpen: isOpen ?? false,
timerDuration: 1000 * 60 * 3, // 3 minutes
creatorUid: context.auth.uid,
});
Expand Down

0 comments on commit 2ec87d9

Please sign in to comment.