Can reset password

This commit is contained in:
2023-06-12 19:10:31 +02:00
parent 1bd18133b3
commit e5827656fa
6 changed files with 221 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import { atom } from "jotai";
import { APIClient } from "./ApiClient";
import { url } from "inspector";
export interface CheckResetTokenResponse {
name: string;
@@ -92,4 +93,18 @@ export class AuthApi {
})
).data;
}
/**
* Reset password
*/
static async ResetPassword(
token: string,
newPassword: string
): Promise<void> {
await APIClient.exec({
uri: "/auth/reset_password",
method: "POST",
jsonData: { token: token, password: newPassword },
});
}
}