Please end this quick

This commit is contained in:
2026-01-05 22:05:02 +01:00
parent c754e4c17f
commit c6816ebc3b
64 changed files with 5063 additions and 8 deletions

View File

@@ -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();

View File

@@ -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();