Project

General

Profile

« Previous | Next » 

Revision 58346

[AdminTools]: Make recaptcha mandatory again.

View differences:

modules/uoa-admin-tools/src/main/java/eu/dnetlib/uoaadmintools/controllers/EmailController.java
31 31

  
32 32
    @RequestMapping(value = "/contact", method = RequestMethod.POST)
33 33
    public Boolean contact(@RequestBody EmailRecaptcha form)  throws InvalidReCaptchaException {
34
        if(form.getRecaptcha() != null) {
35
            verifyRecaptcha.processResponse(form.getRecaptcha());
36
        }
34
        verifyRecaptcha.processResponse(form.getRecaptcha());
37 35
        Email email = form.getEmail();
38 36
        ArrayList<String> sendTo = new ArrayList<>(email.getRecipients());
39 37
        return emailSender.send(sendTo, email.getSubject(), email.getBody(), false);

Also available in: Unified diff