mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-02 00:28:35 +00:00
request password reset form
This commit is contained in:
parent
ef06e4fbb2
commit
c83d178182
2 changed files with 72 additions and 8 deletions
|
@ -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<UserRegistration, TokenResponse>({ url: route("/users/register"), body });
|
||||
}
|
||||
|
||||
public resetPasseord(email: string) {
|
||||
return this.http.post<PasswordResetRequest, void>({
|
||||
url: route("/users/request-password-reset"),
|
||||
body: { email },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue