chore(deps): update module github.com/coreos/go-oidc to v3 - autoclosed #17

Closed
renovate-bot wants to merge 55 commits from renovate/github.com-coreos-go-oidc-3.x into master
2 changed files with 23 additions and 1 deletions
Showing only changes of commit cc4b10db42 - Show all commits

View File

@ -28,6 +28,15 @@ func init() {
if !s.Shown && (s.Direct == nil || *s.Direct != response.IdQuestion) {
return APIErrorResponse{err: fmt.Errorf("Cette question n'est pas disponible")}
} else if len(response.Answer) > 0 {
// Check if the response has changed
if response.Id != 0 {
if res, err := s.GetResponse(int(response.Id)); err == nil {
if res.IdUser == u.Id && res.Answer == response.Answer {
continue
}
}
}
if _, err := s.NewResponse(response.IdQuestion, u.Id, response.Answer); err != nil {
return APIErrorResponse{err: err}
}
@ -50,6 +59,15 @@ func init() {
for _, response := range responses {
if len(response.Answer) > 0 {
// Check if the response has changed
if response.Id != 0 {
if res, err := s.GetResponse(int(response.Id)); err == nil {
if res.IdUser == u.Id && res.Answer == response.Answer {
continue
}
}
}
if _, err := s.NewResponse(response.IdQuestion, u.Id, response.Answer); err != nil {
return APIErrorResponse{err: err}
}

View File

@ -15,7 +15,11 @@
const res = [];
for (const r in responses) {
res.push({"id_question": responses[r].id_question, "value": String(responses[r].value)})
res.push({
"id": responses[r].id,
"id_question": responses[r].id_question,
"value": String(responses[r].value)
})
}
survey.submitAnswers(res, id_user).then((response) => {