chore: stabilize lint and verify builds
This commit is contained in:
@@ -252,6 +252,7 @@ func (s *creator) ExportReport(
|
||||
}
|
||||
|
||||
filename := fmt.Sprintf("report_overview_%s.csv", time.Now().Format("20060102_150405"))
|
||||
|
||||
return &creator_dto.ReportExportResponse{
|
||||
Filename: filename,
|
||||
MimeType: "text/csv",
|
||||
@@ -287,6 +288,7 @@ func (s *creator) orderAggregate(
|
||||
if err != nil {
|
||||
return 0, 0, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return total.Count, total.Amount, nil
|
||||
}
|
||||
|
||||
@@ -316,6 +318,7 @@ func (s *creator) orderSeries(
|
||||
key := row.Day.Format("2006-01-02")
|
||||
result[key] = row
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
@@ -330,6 +333,7 @@ func (s *creator) contentCount(ctx context.Context, tenantID int64) (int64, erro
|
||||
if err != nil {
|
||||
return 0, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return total, nil
|
||||
}
|
||||
|
||||
@@ -343,6 +347,7 @@ func (s *creator) contentCreatedAggregate(ctx context.Context, tenantID int64, r
|
||||
if err != nil {
|
||||
return 0, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return total, nil
|
||||
}
|
||||
|
||||
@@ -358,6 +363,7 @@ func (s *creator) contentCreatedSeries(ctx context.Context, tenantID int64, rg r
|
||||
if err != nil {
|
||||
return nil, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return buildCountSeries(rows), nil
|
||||
}
|
||||
|
||||
@@ -378,6 +384,7 @@ func (s *creator) contentActionAggregate(
|
||||
if err := query.Scan(&total).Error; err != nil {
|
||||
return 0, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return total, nil
|
||||
}
|
||||
|
||||
@@ -400,6 +407,7 @@ func (s *creator) contentActionSeries(
|
||||
if err != nil {
|
||||
return nil, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return buildCountSeries(rows), nil
|
||||
}
|
||||
|
||||
@@ -413,6 +421,7 @@ func (s *creator) commentAggregate(ctx context.Context, tenantID int64, rg repor
|
||||
if err != nil {
|
||||
return 0, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return total, nil
|
||||
}
|
||||
|
||||
@@ -428,6 +437,7 @@ func (s *creator) commentSeries(ctx context.Context, tenantID int64, rg reportRa
|
||||
if err != nil {
|
||||
return nil, errorx.ErrDatabaseError.WithCause(err)
|
||||
}
|
||||
|
||||
return buildCountSeries(rows), nil
|
||||
}
|
||||
|
||||
@@ -437,6 +447,7 @@ func buildCountSeries(rows []reportCountRow) map[string]int64 {
|
||||
key := row.Day.Format("2006-01-02")
|
||||
result[key] = row.Count
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -475,6 +486,7 @@ func (s *creator) normalizeReportRange(filter *creator_dto.ReportOverviewFilter)
|
||||
}
|
||||
|
||||
endNext := endDay.AddDate(0, 0, 1)
|
||||
|
||||
return reportRange{
|
||||
startDay: startDay,
|
||||
endDay: endDay,
|
||||
|
||||
Reference in New Issue
Block a user