refactor(server/api): migrate admin_smtp/admin_tracks + playlist refresh preludes (A2 6/N)

This commit is contained in:
2026-05-08 10:18:35 -04:00
parent 9dd5da514c
commit bf90a3a868
4 changed files with 6 additions and 13 deletions
+1 -3
View File
@@ -8,7 +8,6 @@ import (
"time"
"git.fabledsword.com/bvandeusen/minstrel/internal/apierror"
"git.fabledsword.com/bvandeusen/minstrel/internal/auth"
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
"git.fabledsword.com/bvandeusen/minstrel/internal/mailer"
)
@@ -100,9 +99,8 @@ func (h *handlers) handleUpdateSMTPConfig(w http.ResponseWriter, r *http.Request
}
func (h *handlers) handleTestSMTPConfig(w http.ResponseWriter, r *http.Request) {
caller, ok := auth.UserFromContext(r.Context())
caller, ok := requireUser(w, r)
if !ok {
writeErr(w, apierror.Unauthorized("auth_required", ""))
return
}
if caller.Email == nil || *caller.Email == "" {