feat: categories table, API, category field in articles

This commit is contained in:
Alexey Pavlov
2026-05-31 14:43:27 +03:00
parent b48c1854a2
commit e5e7e9ef98
4 changed files with 35 additions and 7 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ router.get('/admin', async (req, res) => {
const limit = Math.min(parseInt(req.query.limit) || 100, 200);
const offset = parseInt(req.query.offset) || 0;
const { rows } = await query(
`SELECT id, slug, title, excerpt, cover_url, tags, author, reading_time,
`SELECT id, slug, title, excerpt, cover_url, tags, category, author, reading_time,
status, seo_title, seo_descr, views, published_at, created_at, updated_at
FROM articles ORDER BY created_at DESC LIMIT $1 OFFSET $2`,
[limit, offset]