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

fix: specify dob as form data for getStudentCode

This commit is contained in:
veloii 2024-11-07 16:47:38 +00:00
parent 86afa2a01e
commit ec2cfefb73
No known key found for this signature in database

View file

@ -111,9 +111,10 @@ export class StudentClient extends BaseClient {
): Promise<GetStudentCodeResponse> {
const data = await this.makeAuthedRequest(`${this.API_BASE}/getcode`, {
method: "POST",
body: JSON.stringify({
date: options.dateOfBirth,
}),
body: `date=${options.dateOfBirth}`,
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
return data;
}