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

style: prettier and eslint

This commit is contained in:
James Cook 2022-03-12 11:37:28 +00:00
parent e1ac2b1364
commit efba7086ea
8 changed files with 33 additions and 2803 deletions

View file

@ -1,21 +1,5 @@
import Undici from "undici";
import { RequestOptions } from "undici/types/dispatcher";
import {
ActivityResponse,
AnnouncementsResponse,
BadgesResponse,
BehaviourResponse,
DetentionsResponse,
GetActivityOptions,
GetBehaviourOptions,
GetHomeworkOptions,
GetLessonsOptions,
GetPupilsResponse,
Homework,
HomeworksResponse,
LessonsResponse,
Student,
} from "./types";
import type { GetPupilsResponse } from "./types";
import { ClasschartsClient } from "./client";
import { API_BASE_PARENT, BASE_URL } from "./consts";
@ -74,7 +58,7 @@ export class ClasschartsParentClient extends ClasschartsClient {
this.sessionId = sessionID.session_id;
let pupil = await this.getPupils();
const pupil = await this.getPupils();
this.studentId = pupil[0].id;
this.studentName = pupil[0].name;
@ -84,10 +68,8 @@ export class ClasschartsParentClient extends ClasschartsClient {
* @returns an array fo Pupils connected to this parent's account
*/
async getPupils(): Promise<GetPupilsResponse> {
let pupils = this.makeAuthedRequest(this.API_BASE + "/pupils", {
return this.makeAuthedRequest(this.API_BASE + "/pupils", {
method: "GET",
});
return pupils;
}
}