feat: editor_notes + /api/stats/live + tokens в getArticleBySlug

- БД: таблица editor_notes (title/content/author/tags/is_pinned/is_published)
- routes/notes.js: CRUD заметок редактора
- /api/stats/live: latest article, processing job, активность за 7 дней
- getArticleBySlug: JOIN с generation_jobs для tokens_in/out
This commit is contained in:
Alexey Pavlov
2026-05-31 10:05:28 +03:00
parent c7b83147f1
commit bc2d311e59
5 changed files with 161 additions and 1 deletions
+2
View File
@@ -8,6 +8,7 @@ const channelsRoutes = require('./src/routes/channels');
const postsRoutes = require('./src/routes/posts');
const articlesRoutes = require('./src/routes/articles');
const statsRoutes = require('./src/routes/stats');
const notesRoutes = require('./src/routes/notes');
// Start queue worker
require('./src/workers/generation');
@@ -38,6 +39,7 @@ app.use('/api/channels', channelsRoutes);
app.use('/api/posts', postsRoutes);
app.use('/api/articles', articlesRoutes);
app.use('/api/stats', statsRoutes);
app.use('/api/notes', notesRoutes);
app.get('/health', (req, res) => {
res.json({ ok: true, service: 'zeropost-engine', time: new Date() });