PLEASE WORK FOR FUCKS SAKE

This commit is contained in:
2026-01-06 00:38:24 +01:00
parent 4c5efe87e9
commit 65ada32652

View File

@@ -27,11 +27,9 @@ public class EmailController {
} }
@PostMapping("/mail/send") @PostMapping("/mail/send")
public ResponseEntity<String> send(@RequestBody String payload){ public ResponseEntity<String> send(@RequestBody Map<String, Object> payload){
try { try {
ObjectMapper mapper = new ObjectMapper(); //service.send("laurent0206.cr@gmail.com", "Hello from board mate !", map);
Map<String, Object> map = mapper.readValue(payload, new TypeReference<>() {});
service.send("laurent0206.cr@gmail.com", "Hello from board mate !", map);
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();