feat: 添加管理员密码修改功能
This commit is contained in:
@@ -49,12 +49,20 @@ export const useAuthStore = defineStore("auth", () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function changePassword(currentPassword: string, newPassword: string) {
|
||||
await apiClient.post("/auth/change-password", {
|
||||
currentPassword,
|
||||
newPassword
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
token,
|
||||
user,
|
||||
isAuthenticated,
|
||||
login,
|
||||
logout,
|
||||
changePassword,
|
||||
clearSession
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user