From 02a2e00fee63297e86595c86d0f1e456df135950 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 11 Feb 2022 23:46:48 +0000 Subject: [PATCH] fix: use student ID in activity --- src/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 9ec403b..61beb46 100644 --- a/src/client.ts +++ b/src/client.ts @@ -51,8 +51,8 @@ export class ClasschartsClient { let responseJSON; try { responseJSON = await request.body.json(); - } catch (err) { - throw new Error("Invalid JSON response, check your dates"); + } catch { + throw new Error("Invalid JSON response recieved"); } if (responseJSON.success == 0) { throw new Error(responseJSON.error); @@ -125,7 +125,7 @@ export class ClasschartsClient { options?.to && params.append("to", options?.to); options?.last_id && params.append("last_id", options?.last_id); return this.makeAuthedRequest( - API_BASE + "/activity/" + this.sessionId + "?" + params.toString(), + API_BASE + "/activity/" + this.studentId + "?" + params.toString(), { method: "GET", }