fix(routes): Move editorial-guidelines route before /:slug catch-all
- Fixed route ordering issue where /editorial-guidelines was matching /:slug - Removed duplicate route definition - Editorial Guidelines page now loads correctly - Mobile-ready admin pages confirmed (viewport + Tailwind responsive)
This commit is contained in:
parent
8528fd079b
commit
3b584daa8d
1 changed files with 7 additions and 7 deletions
|
|
@ -20,6 +20,13 @@ router.get('/rss',
|
|||
asyncHandler(blogController.generateRSSFeed)
|
||||
);
|
||||
|
||||
// GET /api/blog/editorial-guidelines - Get editorial guidelines (must be before /:slug)
|
||||
router.get('/editorial-guidelines',
|
||||
authenticateToken,
|
||||
requireRole('admin', 'moderator'),
|
||||
asyncHandler(blogController.getEditorialGuidelines)
|
||||
);
|
||||
|
||||
// GET /api/blog - List published posts
|
||||
router.get('/',
|
||||
asyncHandler(blogController.listPublishedPosts)
|
||||
|
|
@ -91,13 +98,6 @@ router.post('/validate-article',
|
|||
asyncHandler(blogController.validateArticle)
|
||||
);
|
||||
|
||||
// GET /api/blog/editorial-guidelines - Get editorial guidelines
|
||||
router.get('/editorial-guidelines',
|
||||
authenticateToken,
|
||||
requireRole('admin', 'moderator'),
|
||||
asyncHandler(blogController.getEditorialGuidelines)
|
||||
);
|
||||
|
||||
// GET /api/blog/admin/posts?status=draft
|
||||
router.get('/admin/posts',
|
||||
authenticateToken,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue