Remove not working stats

This commit is contained in:
2024-11-08 23:58:57 +01:00
parent dd3ea9f65f
commit ebf32e775c
2 changed files with 1 additions and 46 deletions

View File

@@ -8,8 +8,6 @@ type SystemStats struct {
TotalUsers int `json:"totalUsers"`
TotalWorkspaces int `json:"totalWorkspaces"`
ActiveUsers int `json:"activeUsers"` // Users with activity in last 30 days
StorageUsed int `json:"storageUsed"` // Total storage used in bytes
TotalFiles int `json:"totalFiles"` // Total number of files across all workspaces
}
// GetAllUsers returns a list of all users in the system
@@ -66,15 +64,5 @@ func (db *DB) GetSystemStats() (*SystemStats, error) {
return nil, err
}
// Get total files and storage used
// Note: This assumes you're tracking file sizes in your filesystem
err = db.QueryRow(`
SELECT COUNT(*), COALESCE(SUM(size), 0)
FROM files`).
Scan(&stats.TotalFiles, &stats.StorageUsed)
if err != nil {
return nil, err
}
return stats, nil
}