From ec2cfefb73dc2aa3bacbf95d842815f8c637fa2b Mon Sep 17 00:00:00 2001 From: veloii <85405932+veloii@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:47:38 +0000 Subject: [PATCH] fix: specify dob as form data for getStudentCode --- src/core/studentClient.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/studentClient.ts b/src/core/studentClient.ts index 9e61c43..7f2be42 100644 --- a/src/core/studentClient.ts +++ b/src/core/studentClient.ts @@ -111,9 +111,10 @@ export class StudentClient extends BaseClient { ): Promise { 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; }