class CmsConsentController implements CmsConsentApi {

    @Override
    public ResponseEntity<ConsentStatusResponse> getConsentStatusById(String encryptedConsentId) {
        CmsResponse<ConsentStatus> consentStatusById = consentServiceEncrypted.getConsentStatusById(encryptedConsentId);

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

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

}