Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-03-17 11:17:00 +03:00
parent 84466e87ba
commit ba8c1dd801
2 changed files with 21 additions and 0 deletions

View File

@@ -16,6 +16,12 @@ import (
func ExportStatementAgingPDFHandler(_ *sql.DB) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
defer func() {
if rec := recover(); rec != nil {
http.Error(w, fmt.Sprintf("pdf panic: %v", rec), http.StatusInternalServerError)
}
}()
claims, ok := auth.GetClaimsFromContext(r.Context())
if !ok || claims == nil {
http.Error(w, "unauthorized", http.StatusUnauthorized)