This commit is contained in:
Luk 2024-02-05 11:37:07 +08:00
parent 5104ce87ee
commit 15b87bbd7c

View File

@ -31,14 +31,14 @@ module.exports = {
} }
*/ */
if (result.messageId && result.response === '250 Ok') { if (result.messageId && result.response === '250 Ok') {
console.log({ _at: new Date().toJSON(), _state: 'MSG_SENT_SUCCESS', ...result }) console.log({ _at: new Date().toJSON(), _state: 'MSG_SENT_SUCCESS', ...result }, '\n,')
return { _state: 'MSG_SENT_SUCCESS' } return { _state: 'MSG_SENT_SUCCESS' }
} }
console.log({ _at: new Date().toJSON(), _state: 'MSG_SEND_FAIL', ...result }) console.log({ _at: new Date().toJSON(), _state: 'MSG_SEND_FAIL', ...result }, '\n,')
return { _state: 'MSG_SEND_FAIL' } return { _state: 'MSG_SEND_FAIL' }
}) })
.catch((error) => { .catch((error) => {
console.log({ _at: new Date().toJSON(), _state: 'SMS_SEND_ERROR', error }) console.log({ _at: new Date().toJSON(), _state: 'SMS_SEND_ERROR', error }, '\n,')
return { _state: 'SMS_SEND_ERROR' } return { _state: 'SMS_SEND_ERROR' }
}) })
}, },