2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00

feat: 用户支持开启2FA

This commit is contained in:
2025-05-14 19:04:03 +08:00
parent 462d6c0789
commit 5fd00acd48
15 changed files with 476 additions and 88 deletions

View File

@@ -114,6 +114,16 @@ func (route *Http) Register(r *chi.Mux) {
r.Get("/info", route.user.Info)
})
r.Route("/users", func(r chi.Router) {
r.Get("/", route.user.List)
r.Post("/", route.user.Create)
r.Post("/{id}/password", route.user.UpdatePassword)
r.Post("/{id}/email", route.user.UpdateEmail)
r.Get("/{id}/2fa", route.user.GenerateTwoFA)
r.Post("/{id}/2fa", route.user.UpdateTwoFA)
r.Delete("/{id}", route.user.Delete)
})
r.Route("/dashboard", func(r chi.Router) {
r.Get("/panel", route.dashboard.Panel)
r.Get("/home_apps", route.dashboard.HomeApps)