feature/Tweak endpoint addConsentUser v4.0.0

This commit is contained in:
Marko Milić 2025-05-13 09:58:13 +02:00
parent e1c1190ecb
commit 46f515448d
2 changed files with 4 additions and 2 deletions

View File

@ -8081,7 +8081,9 @@ trait APIMethods400 extends MdcLoggable {
consent <- Future(Consents.consentProvider.vend.getConsentByConsentId(consentId)) map {
i => connectorEmptyResponse(i, callContext)
}
_ <- Helper.booleanToFuture(ConsentUserAlreadyAdded, cc=callContext) { consent.userId != null }
_ <- Helper.booleanToFuture(ConsentUserAlreadyAdded, cc = cc.callContext) {
Option(consent.userId).forall(_.isBlank) // checks whether userId is not populated
}
consent <- Future(Consents.consentProvider.vend.updateConsentUser(consentId, user)) map {
i => connectorEmptyResponse(i, callContext)
}

View File

@ -1439,7 +1439,7 @@ trait APIMethods510 {
nameOf(updateConsentUserIdByConsentId),
"PUT",
"/management/banks/BANK_ID/consents/CONSENT_ID/created-by-user",
"Update Consent Created by User by CONSENT_ID",
"Update Created by User of Consent by CONSENT_ID",
s"""
|
|This endpoint is used to Update the User bound to a consent.