fix(email,sms): Reorder debug logging to avoid confusion in email and sms connectors
This commit is contained in:
@@ -13,12 +13,6 @@ export class SzEmailConnector {
|
||||
public async sendEmail(
|
||||
optionsArg: plugins.servezoneInterfaces.platformservice.mta.IRequest_SendEmail['request']
|
||||
) {
|
||||
const typedRequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.mta.IRequest_SendEmail>(
|
||||
'sendEmail'
|
||||
);
|
||||
const response = await typedRequest.fire(optionsArg);
|
||||
|
||||
if (process.env.SERVEZONE_PLATFORMCLIENT_DEBUG) {
|
||||
logger.log('info', `sent email with subject ${optionsArg.title} to ${optionsArg.to}
|
||||
body:
|
||||
@@ -26,6 +20,11 @@ export class SzEmailConnector {
|
||||
|
||||
`);
|
||||
}
|
||||
const typedRequest =
|
||||
this.platformClientRef.typedsocket.createTypedRequest<plugins.servezoneInterfaces.platformservice.mta.IRequest_SendEmail>(
|
||||
'sendEmail'
|
||||
);
|
||||
const response = await typedRequest.fire(optionsArg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user