mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 18:39:32 +00:00
Remove dangling commas
This commit is contained in:
2
app.js
2
app.js
@@ -76,7 +76,7 @@ async function main() {
|
|||||||
allowProtoPropertiesByDefault: true,
|
allowProtoPropertiesByDefault: true,
|
||||||
allowProtoMethodsByDefault: true
|
allowProtoMethodsByDefault: true
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
app.set('view engine', 'hbs');
|
app.set('view engine', 'hbs');
|
||||||
app.set('views', path.join(__dirname, 'views'));
|
app.set('views', path.join(__dirname, 'views'));
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class Class {
|
|||||||
const [
|
const [
|
||||||
teachers,
|
teachers,
|
||||||
students,
|
students,
|
||||||
subject,
|
subject
|
||||||
] = await Promise.all([
|
] = await Promise.all([
|
||||||
this.getTeachers(),
|
this.getTeachers(),
|
||||||
this.getStudents(),
|
this.getStudents(),
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class EmailBuilder {
|
|||||||
cc: `${this.#cc.join(',')}`,
|
cc: `${this.#cc.join(',')}`,
|
||||||
bcc: `${this.#bcc.join(',')}`,
|
bcc: `${this.#bcc.join(',')}`,
|
||||||
subject: this.#subject,
|
subject: this.#subject,
|
||||||
text: this.#body,
|
text: this.#body
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Subject {
|
|||||||
|
|
||||||
return (async () => {
|
return (async () => {
|
||||||
const record = await this.#conn.runQuery(sql, [
|
const record = await this.#conn.runQuery(sql, [
|
||||||
subjectId,
|
subjectId
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!record.length)
|
if (!record.length)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class Test {
|
|||||||
|
|
||||||
return (async () => {
|
return (async () => {
|
||||||
const record = await this.#conn.runQuery(sql, [
|
const record = await this.#conn.runQuery(sql, [
|
||||||
testId,
|
testId
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!record.length)
|
if (!record.length)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class TestTemplate {
|
|||||||
|
|
||||||
return (async () => {
|
return (async () => {
|
||||||
const record = await this.#conn.runQuery(sql, [
|
const record = await this.#conn.runQuery(sql, [
|
||||||
testTemplateId,
|
testTemplateId
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (!record.length)
|
if (!record.length)
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ describe('validate', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fields = [
|
const fields = [
|
||||||
'name',
|
'name'
|
||||||
];
|
];
|
||||||
|
|
||||||
const result = validator.validate(body, fields);
|
const result = validator.validate(body, fields);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ router.post('/login', async (req, res) => {
|
|||||||
'password'
|
'password'
|
||||||
],
|
],
|
||||||
{
|
{
|
||||||
email: 'email',
|
email: 'email'
|
||||||
}
|
}
|
||||||
).fields;
|
).fields;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ router.get('/:id', async (req, res) => {
|
|||||||
{
|
{
|
||||||
value: '50%',
|
value: '50%',
|
||||||
text: 'Last percentage'
|
text: 'Last percentage'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -134,7 +134,7 @@ router.post('/:id/:userType(members|teachers)/add', async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
fields = validator.validate(req.body,
|
fields = validator.validate(req.body,
|
||||||
[
|
[
|
||||||
'email',
|
'email'
|
||||||
], {
|
], {
|
||||||
email: 'email'
|
email: 'email'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ router.get('/:id', async (req, res) => {
|
|||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
text: 'Placeholder'
|
text: 'Placeholder'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -86,7 +86,7 @@ router.post('/:id/results/:resultId/edit', async (req, res) => {
|
|||||||
try {
|
try {
|
||||||
fields = validator.validate(req.body,
|
fields = validator.validate(req.body,
|
||||||
[
|
[
|
||||||
'mark',
|
'mark'
|
||||||
]
|
]
|
||||||
).fields;
|
).fields;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const data = {
|
|||||||
otherNames: null,
|
otherNames: null,
|
||||||
lastName: 'Tanz',
|
lastName: 'Tanz',
|
||||||
password: 'p5'
|
password: 'p5'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
student: [
|
student: [
|
||||||
{
|
{
|
||||||
@@ -114,7 +114,7 @@ const data = {
|
|||||||
otherNames: 'Killian James',
|
otherNames: 'Killian James',
|
||||||
lastName: 'O\'Mulrian',
|
lastName: 'O\'Mulrian',
|
||||||
password: 's5'
|
password: 's5'
|
||||||
},
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
subject: [
|
subject: [
|
||||||
@@ -135,7 +135,7 @@ const data = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Electronics'
|
name: 'Electronics'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
class: [
|
class: [
|
||||||
{
|
{
|
||||||
@@ -153,7 +153,7 @@ const data = {
|
|||||||
{
|
{
|
||||||
name: '13(6)',
|
name: '13(6)',
|
||||||
subjectId: 4
|
subjectId: 4
|
||||||
},
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
account: [
|
account: [
|
||||||
@@ -184,7 +184,7 @@ const data = {
|
|||||||
otherNames: null,
|
otherNames: null,
|
||||||
lastName: 'Doe',
|
lastName: 'Doe',
|
||||||
password: 'a4'
|
password: 'a4'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
testTemplate: [
|
testTemplate: [
|
||||||
{
|
{
|
||||||
@@ -300,7 +300,7 @@ const data = {
|
|||||||
classId: 3,
|
classId: 3,
|
||||||
testTemplateId: 4
|
testTemplateId: 4
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
studentParentLink: [
|
studentParentLink: [
|
||||||
{
|
{
|
||||||
@@ -418,51 +418,51 @@ const data = {
|
|||||||
studentId: 5,
|
studentId: 5,
|
||||||
classId: 4
|
classId: 4
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
accountClassLink: [
|
accountClassLink: [
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 1,
|
accountId: 1,
|
||||||
classId: 1,
|
classId: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 1,
|
accountId: 1,
|
||||||
classId: 2,
|
classId: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 2,
|
accountId: 2,
|
||||||
classId: 2,
|
classId: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 3,
|
accountId: 3,
|
||||||
classId: 3,
|
classId: 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 1,
|
accountId: 1,
|
||||||
classId: 4,
|
classId: 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 2,
|
accountId: 2,
|
||||||
classId: 4,
|
classId: 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
lookups: {
|
lookups: {
|
||||||
accountId: 3,
|
accountId: 3,
|
||||||
classId: 4,
|
classId: 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
],
|
],
|
||||||
testResult: [
|
testResult: [
|
||||||
{
|
{
|
||||||
@@ -554,7 +554,7 @@ const data = {
|
|||||||
testId: 8,
|
testId: 8,
|
||||||
accountId: 3
|
accountId: 3
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user