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

Refactored database connection system to use a shared pool per-request

This commit is contained in:
2022-03-23 23:29:55 +00:00
parent bd662661ee
commit 4c2a078530
14 changed files with 162 additions and 144 deletions

View File

@@ -4,8 +4,8 @@
const User = require('./User');
class Student extends User {
constructor(id) {
super('student', id);
constructor(conn, id) {
super(conn, 'student', id);
}
get classes() {
@@ -16,8 +16,9 @@ class Student extends User {
}
static async createStudent(fname, oname, lname, email, password) {
static async createStudent(conn, fname, oname, lname, email, password) {
return await super.createUser(
conn,
'student',
fname,
oname,