File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
packages/activists-api/src/resolvers Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ export type PressureAction = {
1313 form_data ?: any
1414}
1515
16+ type MailInput = {
17+ context : any
18+ body : string
19+ subject : string
20+ email_from : string
21+ email_to : string
22+ trackingSettings : any
23+ }
24+
1625type PressureEmailArgs = {
1726 activist : Activist
1827 emailBody : string
@@ -32,7 +41,7 @@ const send_pressure_mail = async ({
3241 // 1 Changed by activists
3342 // 2 Configured in group of targets
3443 // 3 Configured in settings of widget
35- const mailInput = targets . map ( ( target : string ) => ( {
44+ const mailInput : MailInput [ ] = targets . map ( ( target : string ) => ( {
3645 context : { activist, ...context } ,
3746 body : emailBody ,
3847 subject : emailSubject , // email_subject || group?.email_subject || pressure_subject,
@@ -47,7 +56,12 @@ const send_pressure_mail = async ({
4756
4857 // Envia e-mail de pressão
4958 await NotificationsAPI . send ( mailInput ) ;
50- logger . child ( { mailInput } ) . info ( 'NotificationsAPI' ) ;
59+ logger . child ( { mailInput : mailInput . map ( ( item ) => ( {
60+ context : item . context ,
61+ subject : item . subject ,
62+ from : item . email_from ,
63+ to : item . email_to
64+ } ) ) } ) . info ( 'NotificationsAPI' ) ;
5165}
5266
5367/**
You can’t perform that action at this time.
0 commit comments