Skip to content

Commit

Permalink
learningpath-api: Allow returning http 409 from PATCH endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
jnatten committed Jan 8, 2025
1 parent 7ef784c commit 819e88a
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 819e88a

Please sign in to comment.