Skip to content

Commit

Permalink
fix: CSV has wrong file extension (#19)
Browse files Browse the repository at this point in the history
* Update v1_ctrl_reporting.go

Amend BOM export to CSV

* Update v1_ctrl_reporting.go

---------

Co-authored-by: Matt Kilgore <[email protected]>
  • Loading branch information
katosdev and tankerkiller125 authored Jun 18, 2024
1 parent 0980ee4 commit 2111ee1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/app/api/handlers/v1/v1_ctrl_reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v1

import (
"net/http"

"github.com/hay-kot/httpkit/errchain"
"github.com/sysadminsmedia/homebox/backend/internal/core/services"
)
Expand All @@ -24,8 +23,8 @@ func (ctrl *V1Controller) HandleBillOfMaterialsExport() errchain.HandlerFunc {
return err
}

w.Header().Set("Content-Type", "text/tsv")
w.Header().Set("Content-Disposition", "attachment; filename=bill-of-materials.tsv")
w.Header().Set("Content-Type", "text/csv")
w.Header().Set("Content-Disposition", "attachment; filename=bill-of-materials.csv")
_, err = w.Write(csv)
return err
}
Expand Down

0 comments on commit 2111ee1

Please sign in to comment.