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

Close database connection when finished with it

This commit is contained in:
2022-02-25 19:52:46 +00:00
parent 0ac1b1bb73
commit f299ecd727
6 changed files with 14 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ class Subject {
subjectId,
]);
conn.close();
if (!record.length)
throw new Error('No subject found');