diff --git a/app.js b/app.js index cb502c5..7ec650b 100644 --- a/app.js +++ b/app.js @@ -76,7 +76,7 @@ async function main() { allowProtoPropertiesByDefault: true, allowProtoMethodsByDefault: true } - }), + }) ); app.set('view engine', 'hbs'); app.set('views', path.join(__dirname, 'views')); diff --git a/lib/Class.js b/lib/Class.js index 4408a1c..c9ddd6a 100644 --- a/lib/Class.js +++ b/lib/Class.js @@ -88,7 +88,7 @@ class Class { const [ teachers, students, - subject, + subject ] = await Promise.all([ this.getTeachers(), this.getStudents(), diff --git a/lib/Emailer.js b/lib/Emailer.js index f863235..23ff5f7 100644 --- a/lib/Emailer.js +++ b/lib/Emailer.js @@ -185,7 +185,7 @@ class EmailBuilder { cc: `${this.#cc.join(',')}`, bcc: `${this.#bcc.join(',')}`, subject: this.#subject, - text: this.#body, + text: this.#body }; try { diff --git a/lib/Subject.js b/lib/Subject.js index 80c9b83..5ee092a 100644 --- a/lib/Subject.js +++ b/lib/Subject.js @@ -33,7 +33,7 @@ class Subject { return (async () => { const record = await this.#conn.runQuery(sql, [ - subjectId, + subjectId ]); if (!record.length) diff --git a/lib/Test.js b/lib/Test.js index a7c231a..85ff2c6 100644 --- a/lib/Test.js +++ b/lib/Test.js @@ -83,7 +83,7 @@ class Test { return (async () => { const record = await this.#conn.runQuery(sql, [ - testId, + testId ]); if (!record.length) diff --git a/lib/TestTemplate.js b/lib/TestTemplate.js index c8369cd..4abbbcf 100644 --- a/lib/TestTemplate.js +++ b/lib/TestTemplate.js @@ -67,7 +67,7 @@ class TestTemplate { return (async () => { const record = await this.#conn.runQuery(sql, [ - testTemplateId, + testTemplateId ]); if (!record.length) diff --git a/lib/__tests__/validator.test.js b/lib/__tests__/validator.test.js index 6d050d1..08c4f6e 100644 --- a/lib/__tests__/validator.test.js +++ b/lib/__tests__/validator.test.js @@ -125,7 +125,7 @@ describe('validate', () => { }; const fields = [ - 'name', + 'name' ]; const result = validator.validate(body, fields); diff --git a/routes/main.js b/routes/main.js index bd794a6..2e42434 100644 --- a/routes/main.js +++ b/routes/main.js @@ -66,7 +66,7 @@ router.post('/login', async (req, res) => { 'password' ], { - email: 'email', + email: 'email' } ).fields; } catch (e) { diff --git a/routes/singleClass.js b/routes/singleClass.js index cc7a19e..0daffcc 100644 --- a/routes/singleClass.js +++ b/routes/singleClass.js @@ -52,7 +52,7 @@ router.get('/:id', async (req, res) => { { value: '50%', text: 'Last percentage' - }, + } ] }); }); @@ -134,7 +134,7 @@ router.post('/:id/:userType(members|teachers)/add', async (req, res) => { try { fields = validator.validate(req.body, [ - 'email', + 'email' ], { email: 'email' } diff --git a/routes/singleTest.js b/routes/singleTest.js index 9a88604..4c7e3dc 100644 --- a/routes/singleTest.js +++ b/routes/singleTest.js @@ -51,7 +51,7 @@ router.get('/:id', async (req, res) => { { value: '3', text: 'Placeholder' - }, + } ] }); }); @@ -86,7 +86,7 @@ router.post('/:id/results/:resultId/edit', async (req, res) => { try { fields = validator.validate(req.body, [ - 'mark', + 'mark' ] ).fields; } catch (e) { diff --git a/utility/db/testData.js b/utility/db/testData.js index 8aae892..8ee09ab 100644 --- a/utility/db/testData.js +++ b/utility/db/testData.js @@ -77,7 +77,7 @@ const data = { otherNames: null, lastName: 'Tanz', password: 'p5' - }, + } ], student: [ { @@ -114,7 +114,7 @@ const data = { otherNames: 'Killian James', lastName: 'O\'Mulrian', password: 's5' - }, + } ], subject: [ @@ -135,7 +135,7 @@ const data = { }, { name: 'Electronics' - }, + } ], class: [ { @@ -153,7 +153,7 @@ const data = { { name: '13(6)', subjectId: 4 - }, + } ], account: [ @@ -184,7 +184,7 @@ const data = { otherNames: null, lastName: 'Doe', password: 'a4' - }, + } ], testTemplate: [ { @@ -300,7 +300,7 @@ const data = { classId: 3, testTemplateId: 4 } - }, + } ], studentParentLink: [ { @@ -418,51 +418,51 @@ const data = { studentId: 5, classId: 4 } - }, + } ], accountClassLink: [ { lookups: { accountId: 1, - classId: 1, + classId: 1 } }, { lookups: { accountId: 1, - classId: 2, + classId: 2 } }, { lookups: { accountId: 2, - classId: 2, + classId: 2 } }, { lookups: { accountId: 3, - classId: 3, + classId: 3 } }, { lookups: { accountId: 1, - classId: 4, + classId: 4 } }, { lookups: { accountId: 2, - classId: 4, + classId: 4 } }, { lookups: { accountId: 3, - classId: 4, + classId: 4 } - }, + } ], testResult: [ { @@ -554,7 +554,7 @@ const data = { testId: 8, accountId: 3 } - }, + } ] };