From f0861f287db71ec094454b3700c083d309ca9213 Mon Sep 17 00:00:00 2001 From: Aria <85405932+veloii@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:04:22 +0000 Subject: [PATCH] fix: specify dob as form data for getStudentCode (#46) --- 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; }