Skip to content

Commit

Permalink
Merge pull request #573 from NDLANO/allow-409-from-learningpath-patch
Browse files Browse the repository at this point in the history
learningpath-api: Allow returning http 409 from PATCH endpoints
  • Loading branch information
jnatten authored Jan 8, 2025
2 parents 3e9f1f4 + 819e88a commit d8c6d8b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ trait LearningpathControllerV2 {
.in(pathLearningpathId)
.in(jsonBody[UpdatedLearningPathV2DTO])
.out(jsonBody[LearningPathV2DTO])
.errorOut(errorOutputsFor(400, 401, 403, 404))
.errorOut(errorOutputsFor(400, 401, 403, 404, 409))
.withRequiredMyNDLAUserOrTokenUser
.serverLogicPure { user =>
{ case (pathId, newLearningPath) =>
Expand Down Expand Up @@ -527,7 +527,7 @@ trait LearningpathControllerV2 {
.in(pathLearningpathId / "learningsteps" / pathLearningstepId)
.in(jsonBody[UpdatedLearningStepV2DTO])
.out(jsonBody[LearningStepV2DTO])
.errorOut(errorOutputsFor(400, 401, 403, 404, 502))
.errorOut(errorOutputsFor(400, 401, 403, 404, 409, 502))
.withRequiredMyNDLAUserOrTokenUser
.serverLogicPure { user =>
{ case (pathId, stepId, updatedLearningStep) =>
Expand Down

0 comments on commit d8c6d8b

Please sign in to comment.