mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:56:56 +00:00
Merge pull request #2402 from constantine2nd/develop
Tweak endpoint getConsentByConsentId v5.1.0
This commit is contained in:
commit
b15798e05d
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user