1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 11:58:13 +00:00
This commit is contained in:
James Cook 2022-09-23 18:24:54 +00:00 committed by GitHub
parent a465a84499
commit e584bebb5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ export class ClasschartsClient {
public async makeAuthedRequest(
path: string,
axiosOptions: Omit<AxiosRequestConfig, "path">,
options?: { inlcudeMeta?: boolean }
options?: { includeMeta?: boolean }
) {
if (!this.authCookies) throw new Error("Not authenticated");
const requestOptions: AxiosRequestConfig = {
@ -62,7 +62,7 @@ export class ClasschartsClient {
if (responseJSON.success == 0) {
throw new Error(responseJSON.error);
}
if (options?.inlcudeMeta) {
if (options?.includeMeta) {
return responseJSON;
}
return responseJSON.data;

View file

@ -63,7 +63,7 @@ export class ClasschartsStudentClient extends ClasschartsClient {
{
method: "GET",
},
{ inlcudeMeta: true }
{ includeMeta: true }
);
this.sessionId = pingData.meta.session_id;
}