mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-05 05:54:53 +00:00
fix: #439
This commit is contained in:
@@ -34,7 +34,7 @@ const SettingsPassword = () => {
|
||||
onSubmit: async (values) => {
|
||||
try {
|
||||
await authWithPassword(getAuthStore().record!.email, values.oldPassword);
|
||||
await saveAdmin({ password: values.newPassword });
|
||||
await saveAdmin({ password: values.newPassword, passwordConfirm: values.confirmPassword });
|
||||
|
||||
messageApi.success(t("common.text.operation_succeeded"));
|
||||
|
||||
|
@@ -10,7 +10,7 @@ export const getAuthStore = () => {
|
||||
return getPocketBase().authStore;
|
||||
};
|
||||
|
||||
export const save = (data: { email: string } | { password: string }) => {
|
||||
export const save = (data: { email: string } | { password: string; passwordConfirm: string }) => {
|
||||
return getPocketBase()
|
||||
.collection(COLLECTION_NAME)
|
||||
.update(getAuthStore().record?.id || "", data);
|
||||
|
Reference in New Issue
Block a user