dev day #65,5

This commit is contained in:
Tomas Dvorak
2025-10-20 10:40:55 +02:00
parent 9ccca365b3
commit 68e69e00cc
41 changed files with 981 additions and 1376 deletions
@@ -404,13 +404,13 @@ func (pcr *PollControllerRefactored) GetPollResults(c *gin.Context) {
for _, option := range poll.Options {
var count int64
pcr.DB.Model(&models.PollVote{}).Where("option_id = ?", option.ID).Count(&count)
results = append(results, OptionResult{
OptionID: option.ID,
OptionText: option.Text,
VoteCount: count,
})
totalVotes += count
}