Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/services/quiz.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { QuizRepository } from "../repositories/quiz.repository.js";

const repository = new QuizRepository();
const SUBJECT_OPTIONAL_CERTIFICATIONS = ["TOEIC", "한국사능력검정시험 심화", "한국사능력검정시험 기본", "정보처리기사 필기"];

export class QuizService {
async getQuizzesByCertificationAndType(
Expand All @@ -21,12 +20,6 @@ export class QuizService {
};
}

// ✅ 특정 자격증이면 subjects를 강제로 "1과목"으로 변경
if (certificationNames.some(cert => SUBJECT_OPTIONAL_CERTIFICATIONS.includes(cert))) {
console.log(`🔹 ${certificationNames}는 특정 자격증이므로 "1과목"으로 변경`);
subjects = ["1과목"];
}

// ✅ 랜덤 선택된 `selectedQuizType`으로 퀴즈 조회
const selectedQuizType = quizTypes[Math.floor(Math.random() * quizTypes.length)];
let quizzes = await repository.findQuizzesByCertification(
Expand Down