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

fix: require getLessons options argument (#24)

This commit is contained in:
James 2023-05-02 19:57:37 +01:00 committed by GitHub
parent d752eed8bd
commit 94524229fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 47 additions and 108 deletions

View file

@ -244,7 +244,7 @@ export class BaseClient {
* @param options GetLessonsOptions
* @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");
const params = new URLSearchParams();
params.append("date", String(options?.date));