1414import java .util .HashMap ;
1515import java .lang .Math ;
1616
17+ import io .micronaut .http .MediaType ;
1718import io .micronaut .http .annotation .Body ;
19+ import io .micronaut .http .annotation .Consumes ;
1820import io .micronaut .http .annotation .Controller ;
1921import io .micronaut .http .annotation .Post ;
2022import org .slf4j .Logger ;
@@ -36,7 +38,7 @@ public class SurveysController {
3638 class GmailApi {
3739 public List <String > getEmails () {
3840 List <String > emailAddresses = new ArrayList <>();
39- emailAddresses .add ("a@oci .com" );
41+ emailAddresses .add ("williamsh@objectcomputing .com" );
4042 emailAddresses .add ("b@oci.com" );
4143 emailAddresses .add ("c@oci.com" );
4244 emailAddresses .add ("d@oci.com" );
@@ -68,6 +70,7 @@ public void setGmailSender(GmailSender gmailSender) {
6870 Map gets returned */
6971
7072 @ Post (value = "send" )
73+ @ Consumes (MediaType .APPLICATION_JSON )
7174 public SendSurveys sendEmails (@ Body SendSurveysCommand sendSurveysCommand ) {
7275
7376 LOG .info ("post survey.getTemplateName(): " + sendSurveysCommand .getTemplateName ());
@@ -158,9 +161,10 @@ void sendTheEmails(Map<String, String> emailAddressToBodiesMap) {
158161
159162 LOG .info ("I'm sending the emails now" );
160163
161- emailAddressToBodiesMap .forEach ((address , body ) ->
162- gmailSender .sendEmail ("Feelings, Whoa, Whoa, Whoa, Feelings" , address , body )
163- );
164+ // GmailSender is currently not working
165+ // emailAddressToBodiesMap.forEach((address, body) ->
166+ // gmailSender.sendEmail("Feelings, Whoa, Whoa, Whoa, Feelings", address, body)
167+ // );
164168
165169 }
166170
0 commit comments