Skip to content

Commit

Permalink
👽️ Envoie le nom technique de la réponse au front
Browse files Browse the repository at this point in the history
  • Loading branch information
marouria authored and cprodhomme committed Oct 8, 2024
1 parent 5f4a5fc commit 368a6b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/question_glisser_deposer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def base_json
def reponses_fields
reponses_non_classees = reponses.map do |reponse|
illustration_url = cdn_for(reponse.illustration) if reponse.illustration.attached?
reponse.slice(:id, :position, :position_client).merge(
reponse.slice(:id, :position, :nom_technique, :position_client).merge(
'illustration' => illustration_url
)
end
Expand Down
1 change: 1 addition & 0 deletions spec/models/question_glisser_deposer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
expect(json['reponsesNonClassees'].first['illustration']).not_to be_nil
expect(json['reponsesNonClassees'].first['position']).to be(1)
expect(json['reponsesNonClassees'].first['position_client']).to be(2)
expect(json['reponsesNonClassees'].first['nom_technique']).to eql(reponse1.nom_technique)
end
end
end
Expand Down

0 comments on commit 368a6b3

Please sign in to comment.