mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 03:56:59 +00:00
fix: use student ID in activity
This commit is contained in:
parent
c848ef5b28
commit
02a2e00fee
1 changed files with 3 additions and 3 deletions
|
|
@ -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",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue