Skip to content

Commit

Permalink
feature/Tweak guard at endpoint getConsentByConsentId
Browse files Browse the repository at this point in the history
  • Loading branch information
constantine2nd committed Jun 14, 2024
1 parent 9d27fc5 commit e39e469
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 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 @@ -997,9 +997,7 @@ trait APIMethods510 {
unboxFullOrFail(_, cc.callContext, ConsentNotFound)
}
_ <- Helper.booleanToFuture(failMsg = ConsentNotFound, cc = cc.callContext) {
consent.mConsumerId.get == null ||
consent.mConsumerId.get == "" ||
consent.mConsumerId.get == cc.consumer.map(_.consumerId.get).getOrElse("None")
consent.mUserId == cc.userId
}
} yield {
(JSONFactory510.getConsentInfoJson(consent), HttpCode.`200`(cc))
Expand Down

0 comments on commit e39e469

Please sign in to comment.