feature/Tweak endpoint createConsentByConsentRequestId v5.0.0

This commit is contained in:
Marko Milić 2022-10-18 10:56:42 +02:00
parent cf6e67376e
commit b22a17c97e
2 changed files with 3 additions and 2 deletions

View File

@ -499,7 +499,7 @@ object ErrorMessages {
val ConsentUserCannotBeAdded = "OBP-35026: The Consent's User cannot be added."
val ConsentUserAuthContextCannotBeAdded = "OBP-35027: The Consent's User Auth Context cannot be added."
val ConsentRequestNotFound = "OBP-35028: Consent Request not found by CONSENT_REQUEST_ID. "
val ConsentRequestAlreadyUsed = "OBP-35029: The CONSENT_REQUEST_ID is used to create Consent. "
val ConsentRequestIsInvalid = "OBP-35029: The CONSENT_REQUEST_ID is invalid. "
//Authorisations
val AuthorisationNotFound = "OBP-36001: Authorisation not found. Please specify valid values for PAYMENT_ID and AUTHORISATION_ID. "

View File

@ -761,6 +761,7 @@ trait APIMethods500 {
UserNotLoggedIn,
$BankNotFound,
InvalidJsonFormat,
ConsentRequestIsInvalid,
ConsentAllowedScaMethods,
RolesAllowedInConsent,
ViewsAllowedInConsent,
@ -786,7 +787,7 @@ trait APIMethods500 {
)) map {
i => unboxFullOrFail(i,callContext, ConsentRequestNotFound)
}
_ <- Helper.booleanToFuture(ConsentRequestAlreadyUsed, cc=callContext){
_ <- Helper.booleanToFuture(ConsentRequestIsInvalid, cc=callContext){
Consents.consentProvider.vend.getConsentByConsentRequestId(consentRequestId).isEmpty
}
_ <- Helper.booleanToFuture(ConsentAllowedScaMethods, cc=callContext){