feat(server): 新增修改密码接口 POST /api/auth/password(验原密码、作废会话)

This commit is contained in:
AskaEth committed 2026-09-09 19:26:35 +08:00
1 parent ad2322d558
commit 4cbf5a74f0
13 files changed
+528 -20

No files matched your search

+1
View File
@@ -139,6 +139,7 @@ func (s *server) routes(mux *http.ServeMux) {
mux.HandleFunc("POST /api/auth/login", s.handle(s.login))
mux.HandleFunc("POST /api/auth/logout", s.handle(s.logout))
mux.HandleFunc("GET /api/auth/me", s.handle(s.me))
mux.HandleFunc("POST /api/auth/password", s.handle(s.changePassword))
// 系统配置(guest 一律 403)
mux.HandleFunc("GET /api/settings", s.read(auth.RoleAdmin, s.getSettingsHandler))