fix: 修复会话鉴权「登录后 token 无效」并补齐 NAS 部署流程
- deps.py: _create_redis_client 增加同步 ping 校验,Redis 不可达时正确降级为内存模式 - main.py: lifespan 复用 deps 的 UserStore 单例,避免 admin 与 API 请求实例不一致 - 前端: 强制改密弹窗(must_change_password 用户)、兼容新旧登录返回格式、markPasswordChanged - 新增 NAS SSH 部署脚本与批处理测试;gitignore 前端构建产物
This commit is contained in:
@@ -63,3 +63,15 @@ export function resetPassword(username, newPassword) {
|
||||
export function deleteUser(username) {
|
||||
return http.delete(`/api/v1/auth/users/${encodeURIComponent(username)}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改自己的密码(当前登录用户)
|
||||
* @param {string} oldPassword
|
||||
* @param {string} newPassword
|
||||
*/
|
||||
export function changeMyPassword(oldPassword, newPassword) {
|
||||
return http.post('/api/v1/auth/password', {
|
||||
old_password: oldPassword,
|
||||
new_password: newPassword
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user