Skip to content

Commit

Permalink
Merge pull request #2402 from constantine2nd/develop
Browse files Browse the repository at this point in the history
Tweak endpoint getConsentByConsentId v5.1.0
  • Loading branch information
simonredfern authored Jun 19, 2024
2 parents 496c9aa + d41d3af commit b15798e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala
Original file line number Diff line number Diff line change
Expand Up @@ -994,9 +994,9 @@ trait APIMethods510 {
cc => implicit val ec = EndpointContext(Some(cc))
for {
consent <- Future { Consents.consentProvider.vend.getConsentByConsentId(consentId)} map {
unboxFullOrFail(_, cc.callContext, ConsentNotFound)
unboxFullOrFail(_, cc.callContext, ConsentNotFound, 404)
}
_ <- Helper.booleanToFuture(failMsg = ConsentNotFound, cc = cc.callContext) {
_ <- Helper.booleanToFuture(failMsg = ConsentNotFound, failCode = 404, cc = cc.callContext) {
consent.mUserId == cc.userId
}
} yield {
Expand Down

0 comments on commit b15798e

Please sign in to comment.