fix: Fix category listing

This commit is contained in:
Khaled Garbaya
2017-10-24 13:43:16 +02:00
committed by Benedikt Rötsch
parent f10406b260
commit 46fd1f6d00

View File

@@ -1,8 +1,7 @@
const express = require('express')
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 { getCategories } = require('./categories')
const { getSitemap } = require('./sitemap')
const { getLandingPage } = require('./landingPage')
const router = express.Router()
@@ -12,7 +11,7 @@ router.get('/', catchErrors(getLandingPage))
/* Courses Routes */
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/lessons', catchErrors(getCourse))
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.post('/settings', catchErrors(postSettings))
/* Categories Route */
router.get('/categories', catchErrors(getCategories))
/* Sitemap Route */
router.get('/sitemap', catchErrors(getSitemap))