refactor(server/api): migrate me/* + events preludes (A2 5/N)

This commit is contained in:
2026-05-08 08:44:50 -04:00
parent 79c3ec3659
commit 9dd5da514c
5 changed files with 5 additions and 15 deletions
+1 -3
View File
@@ -8,7 +8,6 @@ import (
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
"git.fabledsword.com/bvandeusen/minstrel/internal/audit"
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
)
@@ -21,9 +20,8 @@ type changePasswordReq struct {
// the caller proves they know their current password before they can
// set a new one. Distinct from the admin-driven reset path.
func (h *handlers) handleChangePassword(w http.ResponseWriter, r *http.Request) {
user, ok := auth.UserFromContext(r.Context())
user, ok := requireUser(w, r)
if !ok {
writeErr(w, apierror.Unauthorized("auth_required", ""))
return
}
var req changePasswordReq