Skip to content

Commit

Permalink
Merge pull request #51 from westonclark/fix-false-positive-submit-bug
Browse files Browse the repository at this point in the history
Fix string contains check in submit function
  • Loading branch information
DaltonSW authored Dec 3, 2024
2 parents 5805451 + 107af64 commit e4d0f84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/resources/Submission.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func NewSubmission(data *http.Response, answer string) (*Submission, error) {
message: message,
}

if strings.Contains(message, "right answer") || strings.Contains(message, "Congratulations!") {
if strings.Contains(message, "That's the right answer!") ||
strings.Contains(message, "Congratulations!") {
newSub.correct = true
} else {
newSub.correct = false
Expand Down

0 comments on commit e4d0f84

Please sign in to comment.