Implement backend for contact form with gateway integration
This commit is contained in:
@@ -25,9 +25,6 @@ public class MailServiceClient {
|
||||
|
||||
private static final String MAIL_ENDPOINT = "http://gateway/api/mail";
|
||||
|
||||
@Value("${INTERNAL_API_KEY}")
|
||||
private String internalApiKey;
|
||||
|
||||
@Async
|
||||
public void sendMail(String email, String subject, String userMessage) {
|
||||
MailRequest request = new MailRequest(email, subject, userMessage);
|
||||
@@ -37,7 +34,6 @@ public class MailServiceClient {
|
||||
private void postEmail(MailRequest request) {
|
||||
try {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("X-Internal-Auth", internalApiKey);
|
||||
|
||||
HttpEntity<MailRequest> entity = new HttpEntity<>(request, headers);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user