ops: мок unisender (письма в data-mail), dry-run ym до build (generate ✓), ТЗ: JSDoc */, poll-флейк sched

This commit is contained in:
2026-08-20 21:26:51 +03:00
parent 859304decb
commit e6c43314e9
5 changed files with 130 additions and 14 deletions

View File

@@ -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',