class CmsConsentController implements CmsConsentApi {

    @Override
    public ResponseEntity<CmsConsent> getConsentById(String encryptedConsentId) {
        CmsResponse<CmsConsent> consentById = consentServiceEncrypted.getConsentById(encryptedConsentId);

        if (consentById.hasError()) {
            return new ResponseEntity<>(HttpStatus.NOT_FOUND);
        }

        return new ResponseEntity<>(consentById.getPayload(), HttpStatus.OK);
    }

}