refactor(server/api): migrate me/* + events preludes (A2 5/N)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user