Please end this quick
This commit is contained in:
@@ -26,7 +26,7 @@ public class EmailController {
|
||||
@PostMapping("/mail/send")
|
||||
public ResponseEntity<String> send(@RequestBody Map<String, Object> payload){
|
||||
try {
|
||||
service.send("laurent0206.cr@gmail.com", "Test", payload.get("content").toString());
|
||||
service.send("laurent0206.cr@gmail.com", "Hello from board mate !", payload.get("content").toString());
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -20,10 +21,10 @@ public class SmsController {
|
||||
this.service = service;
|
||||
}
|
||||
|
||||
@GetMapping("/sms/send")
|
||||
public ResponseEntity<String> example(){
|
||||
@PostMapping("/sms/send")
|
||||
public ResponseEntity<String> example(@RequestBody String text){
|
||||
try {
|
||||
service.send("Hello there !");
|
||||
service.send(text);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user