From c83d17818282b4b49c7bc76642f756cfad2a0371 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Sun, 28 Apr 2024 11:42:37 -0500 Subject: [PATCH] request password reset form --- frontend/lib/api/public.ts | 15 ++++++++- frontend/pages/index.vue | 65 ++++++++++++++++++++++++++++++++++---- 2 files changed, 72 insertions(+), 8 deletions(-) diff --git a/frontend/lib/api/public.ts b/frontend/lib/api/public.ts index 513e492..f44ddbe 100644 --- a/frontend/lib/api/public.ts +++ b/frontend/lib/api/public.ts @@ -1,5 +1,11 @@ import { BaseAPI, route } from "./base"; -import type { APISummary, LoginForm, TokenResponse, UserRegistration } from "./types/data-contracts"; +import type { + APISummary, + LoginForm, + PasswordResetRequest, + TokenResponse, + UserRegistration, +} from "./types/data-contracts"; export type StatusResult = { health: boolean; @@ -27,4 +33,11 @@ export class PublicApi extends BaseAPI { public register(body: UserRegistration) { return this.http.post({ url: route("/users/register"), body }); } + + public resetPasseord(email: string) { + return this.http.post({ + url: route("/users/request-password-reset"), + body: { email }, + }); + } } diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 2f761e2..37f0496 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -1,4 +1,5 @@