Skip to content

Commit

Permalink
Merge pull request #1230 from France-ioi/saveGrade_item_id_string
Browse files Browse the repository at this point in the history
Render item_id of unlocked_items in saveGrade as string
  • Loading branch information
smadbe authored Dec 13, 2024
2 parents e8c41fe + b553043 commit 1ebc77a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions app/api/items/save_grade.feature
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Feature: Save grading result
"validated": false,
"unlocked_items": [
{
"item_id": 50,
"item_id": "50",
"language_tag": "en",
"title": "Chapter A",
"type": "Chapter"
Expand Down Expand Up @@ -389,7 +389,7 @@ Feature: Save grading result
"validated": true,
"unlocked_items": [
{
"item_id": 50,
"item_id": "50",
"language_tag": "en",
"title": "Chapter A",
"type": "Chapter"
Expand Down Expand Up @@ -693,19 +693,19 @@ Feature: Save grading result
"validated": false,
"unlocked_items": [
{
"item_id": 50,
"item_id": "50",
"language_tag": "en",
"title": "Chapter A",
"type": "Chapter"
},
{
"item_id": 80,
"item_id": "80",
"language_tag": "fr",
"title": "Chapitre B",
"type": "Chapter"
},
{
"item_id": 100,
"item_id": "100",
"language_tag": "de",
"title": "Kapitel C",
"type": "Chapter"
Expand Down
2 changes: 1 addition & 1 deletion app/api/items/save_grade.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (srv *Service) saveGrade(w http.ResponseWriter, r *http.Request) service.AP

service.MustNotBeError(render.Render(w, r, service.CreationSuccess(map[string]interface{}{
"validated": validated,
"unlocked_items": unlockedItems,
"unlocked_items": service.ConvertSliceOfMapsFromDBToJSON(unlockedItems),
})))
return service.NoError
}
Expand Down

0 comments on commit 1ebc77a

Please sign in to comment.