feat: Зеро-персонаж, auto-publish, auto-series, channel-stats, fallback covers
- Персонаж Зеро: 23 позы (zeroCharacter.js), скрипты генерации - Auto-publish статей в TG: multipart upload, кнопки, режим alternating Zero/cover - Fallback цепочка обложек: aiprimetech gpt-5.5 → Pollinations → local SVG (6 палитр) - Auto-series: Claude haiku определяет серию для каждой статьи автоматически - Channel stats: подписчики, история, delta 24h/7d - Photo-search: Yandex API, профили доменов, Redis лимиты - Scheduled posts runner: backfill, preview, queue, cancel - promptBuilder: author_persona Зеро, голос от первого лица - Fixes: dollar-placeholder bugs в PATCH channels/autogen, listArticles фильтры - AI model: gpt-5.5 для image generation
This commit is contained in:
@@ -28,13 +28,13 @@ router.patch('/settings/:category', async (req, res) => {
|
||||
try {
|
||||
const { enabled, per_day, run_hour, run_minute } = req.body;
|
||||
const fields = []; const vals = []; let i = 1;
|
||||
if (enabled !== undefined) { fields.push(`enabled=${i++}`); vals.push(enabled); }
|
||||
if (per_day !== undefined) { fields.push(`per_day=${i++}`); vals.push(per_day); }
|
||||
if (run_hour !== undefined) { fields.push(`run_hour=${i++}`); vals.push(run_hour); }
|
||||
if (run_minute !== undefined) { fields.push(`run_minute=${i++}`); vals.push(run_minute); }
|
||||
if (enabled !== undefined) { fields.push(`enabled=$${i++}`); vals.push(enabled); }
|
||||
if (per_day !== undefined) { fields.push(`per_day=$${i++}`); vals.push(per_day); }
|
||||
if (run_hour !== undefined) { fields.push(`run_hour=$${i++}`); vals.push(run_hour); }
|
||||
if (run_minute !== undefined) { fields.push(`run_minute=$${i++}`); vals.push(run_minute); }
|
||||
if (!fields.length) return res.status(400).json({ error: 'Nothing to update' });
|
||||
vals.push(req.params.category);
|
||||
await query(`UPDATE autogen_settings SET ${fields.join(',')} WHERE category=${i}`, vals);
|
||||
await query(`UPDATE autogen_settings SET ${fields.join(',')} WHERE category=$${i}`, vals);
|
||||
res.json({ ok: true });
|
||||
} catch (err) { res.status(500).json({ error: err.message }); }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user