This commit is contained in:
Fu Diwei
2025-02-06 16:39:40 +08:00
parent 4b931f782e
commit 5b9e39a449
3 changed files with 5 additions and 5 deletions

View File

@@ -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"));

View File

@@ -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);