1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:59:30 +00:00

Implemented Test.delete

This commit is contained in:
2022-04-21 13:08:41 +00:00
parent 7ad77443ab
commit ef13568221

View File

@@ -147,6 +147,21 @@ class Test {
);
}
async delete() {
const sql = `
delete from
test
where
testId = ?;
`;
try {
await this.#conn.runQuery(sql, [ this.id ]);
} catch (e) {
console.error(e);
}
}
async hasAccess(u) {
const userTests = await u.getTests();