mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Remove not working stats
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user