From ba1d442f73b10280cbb944f20b77aa8735d48d9d Mon Sep 17 00:00:00 2001 From: Robert Linde Date: Tue, 3 Oct 2017 08:54:40 +0200 Subject: [PATCH] Fix some spelling errors --- routes/categories.js | 2 +- routes/courses.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/categories.js b/routes/categories.js index c718d83..af9de82 100644 --- a/routes/categories.js +++ b/routes/categories.js @@ -2,7 +2,7 @@ const express = require('express') const { catchErrors } = require('../handlers/errorHandlers') const router = express.Router() -/* GET courses listing. */ +/* GET category listing. */ router.get('/', catchErrors(async function (req, res, next) { res.render('categories', { title: 'Categories' }) })) diff --git a/routes/courses.js b/routes/courses.js index 779e0b0..6552e6b 100644 --- a/routes/courses.js +++ b/routes/courses.js @@ -13,9 +13,9 @@ router.get('/', catchErrors(async function (req, res, next) { res.render('courses', { title: `All Courses (${courses.length})`, categories, courses }) })) -/* GET courses listing. */ +/* GET courses listing by category. */ router.get('/categories/:category', catchErrors(async function (req, res, next) { - // we get all the entries with the content type `course` + // we get all the entries with the content type `course` filtered by a category let courses = [] let categories = [] let activeCategory = ''