Skip to content

Commit

Permalink
feat: 17번 문제 채점 로직 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
flydog98 authored and LuizyHub committed Dec 3, 2023
1 parent e95d9db commit 2ce833d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/backend/src/quiz-wizard/quiz-wizard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class QuizWizardService {
13: (containerId: string) => this.checkCondition13(containerId),
15: (containerId: string) => this.checkCondition15(containerId),
16: (containerId: string) => this.checkCondition16(containerId),
17: (containerId: string) => this.checkCondition17(containerId),
};

async submit(containerId: string, quizId: number) {
Expand Down Expand Up @@ -256,4 +257,11 @@ upstream /upstream (push)
async checkCondition16(containerId: string): Promise<boolean> {
return (await this.magic.getNowBranch(containerId)) === 'feat/somethingA';
}

async checkCondition17(containerId: string): Promise<boolean> {
return (
(await this.magic.getTreeHead(containerId, 'main')) ===
'3bd4e8ab14ecf1c7e1e85262ce241c4275080270'
);
}
}

0 comments on commit 2ce833d

Please sign in to comment.