diff --git a/packages/nurekit/src/index.ts b/packages/nurekit/src/index.ts index 69a2fb5..3827cf9 100644 --- a/packages/nurekit/src/index.ts +++ b/packages/nurekit/src/index.ts @@ -1,12 +1,2 @@ -import { Nurekit } from "./client.js"; - export * from "./client.js"; export { IAuditorium, IGroup, ISchedule, ISubject, ITeacher } from "./types/index.js"; - -const nurekit = new Nurekit() - -console.log(await nurekit.groups.getSchedule({ - groupName: "пзпі-23-5", - startTime: "2023-09-22", - endTime: "2023-09-23" -})) diff --git a/packages/nurekit/src/modules/auditoriums.module.ts b/packages/nurekit/src/modules/auditoriums.module.ts index 4e212c0..e319b50 100644 --- a/packages/nurekit/src/modules/auditoriums.module.ts +++ b/packages/nurekit/src/modules/auditoriums.module.ts @@ -134,7 +134,6 @@ export class AuditoriumsModule { `/api/schedule?type=auditory&id=${auditoriumId}&start_time=${startTimestamp}&end_time=${endTimestamp}`, ) .then((res) => res.data) - .catch(handleAxiosError); const result = transformSchedule(rawSchedule); diff --git a/packages/nurekit/src/modules/groups.module.ts b/packages/nurekit/src/modules/groups.module.ts index e40c066..cf4ca13 100644 --- a/packages/nurekit/src/modules/groups.module.ts +++ b/packages/nurekit/src/modules/groups.module.ts @@ -61,7 +61,7 @@ export class GroupsModule { public async findOne(name: string): Promise { const groups = await this.findMany(); - const group = groups.find((group) => group.name === name.toUpperCase()); + const group = groups.find((group) => group.name.toLowerCase() === name); if (!group) { throw new Error("Group with such name doesn't exist"); @@ -132,10 +132,7 @@ export class GroupsModule { `/api/schedule?type=group&id=${groupId}&start_time=${startTimestamp}&end_time=${endTimestamp}`, ) .then((res) => res.data) - .catch(handleAxiosError); - - const result = transformSchedule(rawSchedule); - return result; + return transformSchedule(rawSchedule); } } diff --git a/packages/nurekit/src/modules/teachers.module.ts b/packages/nurekit/src/modules/teachers.module.ts index d535fc2..0862b2d 100644 --- a/packages/nurekit/src/modules/teachers.module.ts +++ b/packages/nurekit/src/modules/teachers.module.ts @@ -141,7 +141,6 @@ export class TeachersModule { `/api/schedule?type=teacher&id=${teacherId}&start_time=${startTimestamp}&end_time=${endTimestamp}`, ) .then((res) => res.data) - .catch(handleAxiosError); const result = transformSchedule(rawSchedule);