feat: categories table, API, category field in articles
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user