[ci skip] more suggested improvements
This commit is contained in:
@@ -3,7 +3,6 @@ package handler
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -186,20 +185,18 @@ LIMIT %d
|
||||
}
|
||||
|
||||
response := models.DailyCreationDiagnosticsResponse{
|
||||
Status: "OK",
|
||||
Date: parsed.Format("2006-01-02"),
|
||||
Table: tableName,
|
||||
TotalRows: totalRows,
|
||||
MissingCreationCount: missingTotal,
|
||||
MissingCreationPct: missingPct,
|
||||
AvgIsPresentLtOneCount: avgIsPresentLtOne,
|
||||
MissingCreationPartialCount: missingPartialCount,
|
||||
MissingByVcenter: byVcenter,
|
||||
Samples: samples,
|
||||
Status: "OK",
|
||||
Date: parsed.Format("2006-01-02"),
|
||||
Table: tableName,
|
||||
TotalRows: totalRows,
|
||||
MissingCreationCount: missingTotal,
|
||||
MissingCreationPct: missingPct,
|
||||
AvgIsPresentLtOneCount: avgIsPresentLtOne,
|
||||
MissingCreationPartialCount: missingPartialCount,
|
||||
MissingByVcenter: byVcenter,
|
||||
Samples: samples,
|
||||
MissingCreationPartialSamples: partialSamples,
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(response)
|
||||
writeJSON(w, http.StatusOK, response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user