ops: мок unisender (письма в data-mail), dry-run ym до build (generate ✓), ТЗ: JSDoc */, poll-флейк sched
This commit is contained in:
@@ -22,7 +22,7 @@ const {
|
||||
PORT = '9090',
|
||||
} = process.env;
|
||||
|
||||
const UNISENDER_ENDPOINT = 'https://go2.unisender.ru/ru/transactional/api/v1/email/send.json';
|
||||
const UNISENDER_ENDPOINT = process.env.UNISENDER_ENDPOINT || 'https://goapi.unisender.ru/ru/transactional/api/v1/email/send.json';
|
||||
|
||||
function verify(req, raw) {
|
||||
if (!WEBHOOK_SECRET) return true;
|
||||
@@ -81,7 +81,7 @@ async function sendEmail(m) {
|
||||
api_key: UNISENDER_API_KEY,
|
||||
message: {
|
||||
template_engine: 'velocity',
|
||||
body: { text: m.body },
|
||||
body: { plaintext: m.body },
|
||||
subject: m.title,
|
||||
from_email: UNISENDER_FROM,
|
||||
from_name: 'sched-pipeline',
|
||||
|
||||
Reference in New Issue
Block a user