Skip to content

Commit

Permalink
fix!(attendance): reason -> reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexcited committed Feb 19, 2024
1 parent 734bcdf commit f5555d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parser/attendance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class StudentDelay {

export class StudentPunishment {
public id: string;
public reason: string | null;
public reasons: string[];

public isDuringLesson: boolean;
public exclusion: boolean;
Expand All @@ -50,7 +50,7 @@ export class StudentPunishment {

constructor (client: Pronote, item: PronoteApiAttendancePunishment) {
this.id = item.N;
this.reason = item.listeMotifs.V?.[0].L || null;
this.reasons = item.listeMotifs.V.map((motif) => motif.L);

this.exclusion = item.estUneExclusion;
this.isDuringLesson = !item.horsCours;
Expand Down

0 comments on commit f5555d0

Please sign in to comment.