mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 11:58:13 +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;
|
let responseJSON;
|
||||||
try {
|
try {
|
||||||
responseJSON = await request.body.json();
|
responseJSON = await request.body.json();
|
||||||
} catch (err) {
|
} catch {
|
||||||
throw new Error("Invalid JSON response, check your dates");
|
throw new Error("Invalid JSON response recieved");
|
||||||
}
|
}
|
||||||
if (responseJSON.success == 0) {
|
if (responseJSON.success == 0) {
|
||||||
throw new Error(responseJSON.error);
|
throw new Error(responseJSON.error);
|
||||||
|
|
@ -125,7 +125,7 @@ export class ClasschartsClient {
|
||||||
options?.to && params.append("to", options?.to);
|
options?.to && params.append("to", options?.to);
|
||||||
options?.last_id && params.append("last_id", options?.last_id);
|
options?.last_id && params.append("last_id", options?.last_id);
|
||||||
return this.makeAuthedRequest(
|
return this.makeAuthedRequest(
|
||||||
API_BASE + "/activity/" + this.sessionId + "?" + params.toString(),
|
API_BASE + "/activity/" + this.studentId + "?" + params.toString(),
|
||||||
{
|
{
|
||||||
method: "GET",
|
method: "GET",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue