Replace combinatorial decorators with capability registry (BC) (#28565)
This commit is contained in:
parent
33d2de24c1
commit
00967eb57e
101 changed files with 2416 additions and 44670 deletions
|
|
@ -21,7 +21,7 @@ func csvResult(ctx context.Context, w http.ResponseWriter, res any, filename str
|
|||
w.Header().Set("Content-Type", "text/csv")
|
||||
w.Header().Set("Content-Disposition", `attachment; filename="`+filename+`.csv"`)
|
||||
|
||||
if ww, ok := res.(api.CsvWriter); ok {
|
||||
if ww, ok := api.Cap[api.CsvWriter](res); ok {
|
||||
_ = ww.WriteCsv(ctx, w)
|
||||
} else {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue