mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Fix linter warning
This commit is contained in:
parent
ead0323e43
commit
e0c9bec91a
2 changed files with 3 additions and 2 deletions
|
@ -18,7 +18,7 @@ type ActiveChartHandler struct {
|
||||||
Database *Database
|
Database *Database
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *ActiveChartHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
|
func (ch *ActiveChartHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { //nolint:dupl
|
||||||
requestPayload, err := ch.parseRequest(req)
|
requestPayload, err := ch.parseRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(resp, err.Error(), http.StatusBadRequest)
|
http.Error(resp, err.Error(), http.StatusBadRequest)
|
||||||
|
|
|
@ -18,13 +18,14 @@ type BandwidthChartHandler struct {
|
||||||
Database *Database
|
Database *Database
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BandwidthChartRequest holds a request for a bandwidth chart.
|
||||||
type BandwidthChartRequest struct {
|
type BandwidthChartRequest struct {
|
||||||
Interval int `json:"interval"`
|
Interval int `json:"interval"`
|
||||||
Query Query `json:"query"`
|
Query Query `json:"query"`
|
||||||
GroupBy []string `json:"groupBy"`
|
GroupBy []string `json:"groupBy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch *BandwidthChartHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
|
func (ch *BandwidthChartHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { //nolint:dupl
|
||||||
requestPayload, err := ch.parseRequest(req)
|
requestPayload, err := ch.parseRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(resp, err.Error(), http.StatusBadRequest)
|
http.Error(resp, err.Error(), http.StatusBadRequest)
|
||||||
|
|
Loading…
Add table
Reference in a new issue