chore: capitalise comments

This commit is contained in:
Mario Bodemann
2017-10-30 14:12:03 +01:00
committed by Benedikt Rötsch
parent b6ae3f9f07
commit 730ce24cc9

View File

@@ -2,7 +2,7 @@ const {getCourses, getCourse, getCategories, getCoursesByCategory} = require('./
const attachEntryState = require('./../lib/entry-state') const attachEntryState = require('./../lib/entry-state')
exports.getCourses = async (req, res, next) => { exports.getCourses = async (req, res, next) => {
// we get all the entries with the content type `course` // We get all the entries with the content type `course`
let courses = [] let courses = []
let categories = [] let categories = []
courses = await getCourses(res.locals.currentLocale.code, res.locals.currentApi.id) courses = await getCourses(res.locals.currentLocale.code, res.locals.currentApi.id)
@@ -24,7 +24,7 @@ exports.getCourse = async (req, res, next) => {
const lessonIndex = lessons.findIndex((lesson) => lesson.fields.slug === req.params.lslug) const lessonIndex = lessons.findIndex((lesson) => lesson.fields.slug === req.params.lslug)
const lesson = lessons[lessonIndex] const lesson = lessons[lessonIndex]
// save visited lessons // Save visited lessons
const cookie = req.cookies.visitedLessons const cookie = req.cookies.visitedLessons
let visitedLessons = cookie || [] let visitedLessons = cookie || []
visitedLessons.push(course.sys.id) visitedLessons.push(course.sys.id)
@@ -40,7 +40,7 @@ exports.getCourse = async (req, res, next) => {
} }
exports.getCoursesByCategory = async (req, res, next) => { exports.getCoursesByCategory = async (req, res, next) => {
// we get all the entries with the content type `course` filtered by a category // We get all the entries with the content type `course` filtered by a category
let courses = [] let courses = []
let categories = [] let categories = []
let activeCategory = '' let activeCategory = ''
@@ -62,7 +62,7 @@ exports.getLesson = async (req, res, next) => {
let lesson = lessons[lessonIndex] let lesson = lessons[lessonIndex]
const nextLesson = lessons[lessonIndex + 1] || null const nextLesson = lessons[lessonIndex + 1] || null
// save visited lessons // Save visited lessons
const cookie = req.cookies.visitedLessons const cookie = req.cookies.visitedLessons
let visitedLessons = cookie || [] let visitedLessons = cookie || []
visitedLessons.push(lesson.sys.id) visitedLessons.push(lesson.sys.id)