dev day #65,5

This commit is contained in:
Tomas Dvorak committed 2025-10-20 10:40:55 +02:00
1 parent 9ccca365b3
commit 68e69e00cc
41 files changed
+981 -1376

No files matched your search

@@ -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
}