aboutsummaryrefslogtreecommitdiff
path: root/src/util/parser.ts
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2022-07-22 15:27:42 -0400
committerFurkan Sahin <furkan-dev@proton.me>2022-07-22 15:27:42 -0400
commit4a7bf83561850c5839a8685a9d01a1be96a2d137 (patch)
tree554394e3764fc7fa456f8f8136318ef206804f96 /src/util/parser.ts
parent3bc9fcdb2f486babc31c845b638ae4c9567c8ec0 (diff)
Add `email` property to `PeerTeacher`
Diffstat (limited to 'src/util/parser.ts')
-rw-r--r--src/util/parser.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/parser.ts b/src/util/parser.ts
index 7e062e1..c466525 100644
--- a/src/util/parser.ts
+++ b/src/util/parser.ts
@@ -51,7 +51,8 @@ interface DatabaseFile {
start: number,
end: number
}[],
- labs: number[]
+ labs: number[],
+ email: string
}[]
}
@@ -73,7 +74,9 @@ export function parsePTSchedule(schedule: string) {
}
const [, firstname, lastname, uin] = nameLine.match(namePattern) as RegExpMatchArray;
- const peerTeacher = new PeerTeacher(uin, firstname, lastname);
+ // TODO email should be parsed from the student's file too I guess, or just end up changing the parser to use survey results for everything, then parse schedules separately.
+ const email = "undefined"
+ const peerTeacher = new PeerTeacher(uin, firstname, lastname, email);
const events = lines
.filter(line => line.match(eventPattern))