sendText 格式

dev/supplier-email-drawer
Lei OT 1 year ago
parent 91ca645c41
commit 4046207872

@ -10,7 +10,7 @@ function sleep(ms) {
exports.sendText = async ctx => { exports.sendText = async ctx => {
const { from, to, msgcontent, content: _content } = ctx.request.body; const { from, to, msgcontent, content: _content } = ctx.request.body;
const content = _content || msgcontent.text || ''; const content = _content || msgcontent.body || '';
if (!from || !content) { if (!from || !content) {
ctx.assert(from, 400, 'From and message are required'); ctx.assert(from, 400, 'From and message are required');
return; return;

Loading…
Cancel
Save