Skip to content

Commit

Permalink
fix(email): 修改 addressee -> address
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Mar 4, 2021
1 parent 00f39d1 commit 509d714
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ email.send({
title: '你好',
subtitle: '这是个小标题',
desp: '你好,我很可爱',
addressee: '[email protected]',
address: '[email protected]',
})

// 钉钉机器人。官方文档:https://developers.dingtalk.com/document/app/custom-robot-access
Expand Down
10 changes: 5 additions & 5 deletions src/push/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type EmailSendOption = {
* 收件人邮箱(邮箱地址必须正确)
*
*/
addressee: string
address: string
}
/**
* 文档:http://doc.berfen.com/1239397
Expand Down Expand Up @@ -60,10 +60,10 @@ export class Email implements Send {
}

async send(option: EmailSendOption): Promise<AxiosResponse<any>> {
const { title, subtitle, desp, addressee } = option
const { title, subtitle, desp, address } = option
Debugger('option: %O', option)
if (!addressee) {
throw new Error('addressee(收件人邮箱) 地址必须正确')
if (!address) {
throw new Error('address(收件人邮箱) 地址必须正确')
}
const free = 'https://email.berfen.com/api'
const pay = `https://email.berfen.com/api/dz/${this.BER_KEY}/`
Expand All @@ -78,7 +78,7 @@ export class Email implements Send {
title,
x_title: subtitle,
text: desp,
to: addressee,
to: address,
},
})
}
Expand Down

0 comments on commit 509d714

Please sign in to comment.