diff --git a/src/core/parentClient.ts b/src/core/parentClient.ts index e500ed6..5f1f0ea 100644 --- a/src/core/parentClient.ts +++ b/src/core/parentClient.ts @@ -88,28 +88,31 @@ export class ParentClient extends BaseClient { } throw new Error("No pupil with specified ID returned"); } - /** + /** * Changes the login password for the current parent account * @param currentPassword Current password * @param newPassword New password * @returns Whether the request was successful */ - async changePassword(currentPassword: string, newPassword: string): Promise { - const formData = new URLSearchParams(); - formData.append("current", current); - formData.append("new", newPassword); - formData.append("repeat", newPassword); - "Content-Type": "application/x-www-form-urlencoded", - }); - return ( - await this.makeAuthedRequest( - this.API_BASE + "/password", - { - method: "POST", - body: formData, - headers: headers, + async changePassword( + currentPassword: string, + newPassword: string, + ): Promise { + const formData = new URLSearchParams(); + formData.append("current", currentPassword); + formData.append("new", newPassword); + formData.append("repeat", newPassword); + return ( + await this.makeAuthedRequest( + this.API_BASE + "/password", + { + method: "POST", + body: formData, + headers: { + "Content-Type": "application/x-www-form-urlencoded", }, - ) - ); - } + }, + ) + ); + } }