fix: Fix category listing
This commit is contained in:
committed by
Benedikt Rötsch
parent
f10406b260
commit
46fd1f6d00
@@ -1,8 +1,7 @@
|
|||||||
const express = require('express')
|
const express = require('express')
|
||||||
const { catchErrors } = require('../handlers/errorHandlers')
|
const { catchErrors } = require('../handlers/errorHandlers')
|
||||||
const { getCourses, getCourse, getLesson, getCourseByCategory } = require('./courses')
|
const { getCourses, getCourse, getLesson, getCoursesByCategory } = require('./courses')
|
||||||
const { getSettings, postSettings } = require('./settings')
|
const { getSettings, postSettings } = require('./settings')
|
||||||
const { getCategories } = require('./categories')
|
|
||||||
const { getSitemap } = require('./sitemap')
|
const { getSitemap } = require('./sitemap')
|
||||||
const { getLandingPage } = require('./landingPage')
|
const { getLandingPage } = require('./landingPage')
|
||||||
const router = express.Router()
|
const router = express.Router()
|
||||||
@@ -12,7 +11,7 @@ router.get('/', catchErrors(getLandingPage))
|
|||||||
|
|
||||||
/* Courses Routes */
|
/* Courses Routes */
|
||||||
router.get('/courses', catchErrors(getCourses))
|
router.get('/courses', catchErrors(getCourses))
|
||||||
router.get('/courses/categories/:category', catchErrors(getCourseByCategory))
|
router.get('/courses/categories/:category', catchErrors(getCoursesByCategory))
|
||||||
router.get('/courses/:slug', catchErrors(getCourse))
|
router.get('/courses/:slug', catchErrors(getCourse))
|
||||||
router.get('/courses/:slug/lessons', catchErrors(getCourse))
|
router.get('/courses/:slug/lessons', catchErrors(getCourse))
|
||||||
router.get('/courses/:cslug/lessons/:lslug', catchErrors(getLesson))
|
router.get('/courses/:cslug/lessons/:lslug', catchErrors(getLesson))
|
||||||
@@ -21,9 +20,6 @@ router.get('/courses/:cslug/lessons/:lslug', catchErrors(getLesson))
|
|||||||
router.get('/settings', catchErrors(getSettings))
|
router.get('/settings', catchErrors(getSettings))
|
||||||
router.post('/settings', catchErrors(postSettings))
|
router.post('/settings', catchErrors(postSettings))
|
||||||
|
|
||||||
/* Categories Route */
|
|
||||||
router.get('/categories', catchErrors(getCategories))
|
|
||||||
|
|
||||||
/* Sitemap Route */
|
/* Sitemap Route */
|
||||||
router.get('/sitemap', catchErrors(getSitemap))
|
router.get('/sitemap', catchErrors(getSitemap))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user