Commit 8c2dd7b3 authored by ius's avatar ius
Browse files

Fix dashboard snapshot lint errors

parent 4167c437
...@@ -162,7 +162,7 @@ func (h *DashboardHandler) buildSnapshotV2Response( ...@@ -162,7 +162,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
if includeStats { if includeStats {
stats, err := h.dashboardService.GetDashboardStats(ctx) stats, err := h.dashboardService.GetDashboardStats(ctx)
if err != nil { if err != nil {
return nil, errors.New("Failed to get dashboard statistics") return nil, errors.New("failed to get dashboard statistics")
} }
resp.Stats = &dashboardSnapshotV2Stats{ resp.Stats = &dashboardSnapshotV2Stats{
DashboardStats: *stats, DashboardStats: *stats,
...@@ -186,7 +186,7 @@ func (h *DashboardHandler) buildSnapshotV2Response( ...@@ -186,7 +186,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters.BillingType, filters.BillingType,
) )
if err != nil { if err != nil {
return nil, errors.New("Failed to get usage trend") return nil, errors.New("failed to get usage trend")
} }
resp.Trend = trend resp.Trend = trend
} }
...@@ -205,7 +205,7 @@ func (h *DashboardHandler) buildSnapshotV2Response( ...@@ -205,7 +205,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters.BillingType, filters.BillingType,
) )
if err != nil { if err != nil {
return nil, errors.New("Failed to get model statistics") return nil, errors.New("failed to get model statistics")
} }
resp.Models = models resp.Models = models
} }
...@@ -224,7 +224,7 @@ func (h *DashboardHandler) buildSnapshotV2Response( ...@@ -224,7 +224,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
filters.BillingType, filters.BillingType,
) )
if err != nil { if err != nil {
return nil, errors.New("Failed to get group statistics") return nil, errors.New("failed to get group statistics")
} }
resp.Groups = groups resp.Groups = groups
} }
...@@ -232,7 +232,7 @@ func (h *DashboardHandler) buildSnapshotV2Response( ...@@ -232,7 +232,7 @@ func (h *DashboardHandler) buildSnapshotV2Response(
if includeUsersTrend { if includeUsersTrend {
usersTrend, _, err := h.getUserUsageTrendCached(ctx, startTime, endTime, granularity, usersTrendLimit) usersTrend, _, err := h.getUserUsageTrendCached(ctx, startTime, endTime, granularity, usersTrendLimit)
if err != nil { if err != nil {
return nil, errors.New("Failed to get user usage trend") return nil, errors.New("failed to get user usage trend")
} }
resp.UsersTrend = usersTrend resp.UsersTrend = usersTrend
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment