1
|
package eu.dnetlib.uoaadmintools.controllers;
|
2
|
|
3
|
import eu.dnetlib.uoaadmintools.emailSender.EmailSender;
|
4
|
import org.apache.log4j.Logger;
|
5
|
import org.springframework.beans.factory.annotation.Autowired;
|
6
|
import org.springframework.web.bind.annotation.*;
|
7
|
|
8
|
import java.util.List;
|
9
|
|
10
|
@RestController
|
11
|
@CrossOrigin(origins = "*")
|
12
|
public class EmailController {
|
13
|
private final Logger log = Logger.getLogger(this.getClass());
|
14
|
|
15
|
@Autowired
|
16
|
private EmailSender emailSender;
|
17
|
|
18
|
@RequestMapping(value = "/invite", method = RequestMethod.POST)
|
19
|
public Boolean inviteReciptients(@RequestBody List<String> reciptients) throws Exception {
|
20
|
emailSender.send(reciptients);
|
21
|
return true;
|
22
|
}
|
23
|
}
|