1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 03:56:59 +00:00

Require getLesson options argument

This commit is contained in:
James Cook 2023-05-02 19:56:19 +01:00
parent e5e445f0ba
commit dc2258d9f8
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"classcharts-api": patch
---
Require getLesson options argument

View file

@ -244,7 +244,7 @@ export class BaseClient {
* @param options GetLessonsOptions * @param options GetLessonsOptions
* @returns Array of lessons * @returns Array of lessons
*/ */
async getLessons(options?: GetLessonsOptions): Promise<LessonsResponse> { async getLessons(options: GetLessonsOptions): Promise<LessonsResponse> {
if (!options?.date) throw new Error("No date specified"); if (!options?.date) throw new Error("No date specified");
const params = new URLSearchParams(); const params = new URLSearchParams();
params.append("date", String(options?.date)); params.append("date", String(options?.date));