Skip to content

[refact] getAverageScore 로직 변경 #106

Description

@hoon730

기능 설명

const correctAnswers = questionSessionRecords.filter((record) => record.is_correct).length는 is_correct키 값의 length로 사용자의 정답 개수와 불일치

해당 gameSession의 total_score로 변경

작업 상세 내용

  • const correctAnswers = questionSessionRecords.filter((record) => record.is_correct).length -> const correctAnswers = sessions.find((session) => session.id === questionSessionRecords?.session_id)?.total_score ?? 0;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions