Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user