Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

update dashboardInfo

aichy126cfcc4c69e307
diff --git a/internal/schema/dashboard_schema.go b/internal/schema/dashboard_schema.go
index f14c9e9b..74eb8ca9 100644
--- a/internal/schema/dashboard_schema.go
+++ b/internal/schema/dashboard_schema.go
@@ -7,8 +7,9 @@ type DashboardInfo struct {
VoteCount int64 `json:"vote_count"`
UserCount int64 `json:"user_count"`
ReportCount int64 `json:"report_count"`
- UploadingFiles string `json:"uploading_files"` //Allowed or Not allowed
- SMTP string `json:"smtp"` //Enabled or Disabled
+ UploadingFiles bool `json:"uploading_files"`
+ SMTP bool `json:"smtp"`
+ HTTPS bool `json:"https"`
TimeZone string `json:"time_zone"`
OccupyingStorageSpace string `json:"occupying_storage_space"`
AppStartTime string `json:"app_start_time"`
diff --git a/internal/service/dashboard/dashboard_service.go b/internal/service/dashboard/dashboard_service.go
index aaeabcfc..2abfa415 100644
--- a/internal/service/dashboard/dashboard_service.go
+++ b/internal/service/dashboard/dashboard_service.go
@@ -97,8 +97,9 @@ func (ds *DashboardService) Statistical(ctx context.Context) (*schema.DashboardI
dashboardInfo.UserCount = userCount
dashboardInfo.ReportCount = reportCount
- dashboardInfo.UploadingFiles = "Allowed"
- dashboardInfo.SMTP = "Enabled"
+ dashboardInfo.UploadingFiles = true
+ dashboardInfo.SMTP = true
+ dashboardInfo.HTTPS = true
dashboardInfo.OccupyingStorageSpace = "1MB"
dashboardInfo.AppStartTime = "102"
return dashboardInfo, nil