Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

Commit

Permalink
加入返回的yes判断
Browse files Browse the repository at this point in the history
  • Loading branch information
sundy-li committed Jan 22, 2018
1 parent 1b476f3 commit 7b42e51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func handleChooseResponse(bs []byte) {
return
}
question.CalData.TrueAnswer = question.Data.Options[chooseResp.Data.Answer-1]
if chooseResp.Data.Yes {
question.CalData.TrueAnswer = question.Data.Options[chooseResp.Data.Option-1]
}
log.Printf("Saving %s , %s", question.Data.Quiz, question.CalData.TrueAnswer)
StoreQuestion(question)
}
Expand Down

1 comment on commit 7b42e51

@sundy-li
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#74

Please sign in to comment.