mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
request password reset form
This commit is contained in:
@@ -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 },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user