🐛 Fix the god damn poll

This commit is contained in:
2025-08-06 01:09:00 +08:00
parent 4a36557714
commit 5bb9ed5f04

View File

@@ -94,8 +94,6 @@ public class PollService(AppDatabase db, ICacheService cache)
case PollQuestionType.YesNo when answer[questionId].ValueKind != JsonValueKind.True && case PollQuestionType.YesNo when answer[questionId].ValueKind != JsonValueKind.True &&
answer[questionId].ValueKind != JsonValueKind.False: answer[questionId].ValueKind != JsonValueKind.False:
throw new Exception($"Answer for question {question.Title} expected to be a boolean"); throw new Exception($"Answer for question {question.Title} expected to be a boolean");
default:
throw new ArgumentOutOfRangeException($"Question type is not supported: {question.Type} {answer[questionId].ValueKind}");
} }
} }
} }