exportação csv

This commit is contained in:
Luiz Silva 2026-01-03 16:12:08 -03:00
parent 65118f2838
commit 6be329f7e6
3 changed files with 281 additions and 95 deletions

View file

@ -40,6 +40,12 @@ func (p *PainelHandlers) Router() http.Handler {
p.auth.handlerPainel(w, r, p.store)
})
// Export CSV (todas as respostas do filtro atual)
// Protegido pelo mesmo middleware do painel.
r.With(func(next http.Handler) http.Handler { return p.auth.middleware(next) }).Get("/export.csv", func(w http.ResponseWriter, r *http.Request) {
p.auth.handlerExportCSV(w, r, p.store)
})
// Debug: conferir IP real / headers.
// Protegido pelo mesmo middleware do painel.
r.With(func(next http.Handler) http.Handler { return p.auth.middleware(next) }).Get("/debug/ip", func(w http.ResponseWriter, r *http.Request) {