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

fix: specify dob as form data for getStudentCode (#46)

This commit is contained in:
Aria 2024-11-07 17:04:22 +00:00 committed by GitHub
parent 86afa2a01e
commit f0861f287d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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