1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00

fix: revalidate auth token

This commit is contained in:
James Cook 2023-04-07 12:43:46 +01:00
parent 91e956b642
commit 797c43ed56
6 changed files with 523 additions and 487 deletions

View file

@ -61,7 +61,6 @@ export class ClasschartsParentClient extends ClasschartsClient {
this.pupils = await this.getPupils();
if (!this.pupils) throw new Error("Account has no pupils attached");
this.studentId = this.pupils[0].id;
this.studentName = this.pupils[0].name;
}
/**
* Get Pupil details
@ -83,7 +82,6 @@ export class ClasschartsParentClient extends ClasschartsClient {
const pupil = pupils[i];
if (pupil.id == pupilId) {
this.studentId = pupil.id;
this.studentName = pupil.name;
return;
}
}